summaryrefslogtreecommitdiff
path: root/Completion/Base/Utility/_arguments
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-14 08:08:44 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-14 08:08:44 +0000
commit757e68c5e7918eaa67ecc9d7a0e9c764d9e81a30 (patch)
tree3b46d4c3272dfa1b57c94515823c15d72b38f7e6 /Completion/Base/Utility/_arguments
parentb0e4b61a82e9a9ee162832ac862a9faf5ec9bd85 (diff)
downloadzsh-757e68c5e7918eaa67ecc9d7a0e9c764d9e81a30.tar.gz
zsh-757e68c5e7918eaa67ecc9d7a0e9c764d9e81a30.zip
fix for _arguments: don't use argument-tag when completing options; fix for _services: leave loop when matches were produced (17148)
Diffstat (limited to 'Completion/Base/Utility/_arguments')
-rw-r--r--Completion/Base/Utility/_arguments7
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 826d5b5c2..0cfc60b54 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -335,9 +335,11 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
[[ -z "$hasopts" &&
-z "$matched" &&
( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
- { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
+ { ! zstyle -T ":completion:${oldcontext%:*}:options" prefix-needed ||
[[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
- local prevpre="$PREFIX" previpre="$IPREFIX"
+ local prevpre="$PREFIX" previpre="$IPREFIX" prevcontext="$curcontext"
+
+ curcontext="${oldcontext%:*}:options"
hasopts=yes
@@ -389,6 +391,7 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
fi
PREFIX="$prevpre"
IPREFIX="$previpre"
+ curcontext="$prevcontext"
fi
[[ -n "$tried" && "${${alwopt:+$origpre}:-$PREFIX}" != [-+]* ]] && break
done