diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-01 11:16:17 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-01 11:16:17 +0000 |
commit | f25a524da526b843c73e9febcf6987c35a8dec74 (patch) | |
tree | dd2a5d30084bc5fe2c64ef463569c2d3bcae2c0b /Completion | |
parent | 229f9ccdc4e3be7d22b44382b73a2a88c95e5f10 (diff) | |
download | zsh-f25a524da526b843c73e9febcf6987c35a8dec74.tar.gz zsh-f25a524da526b843c73e9febcf6987c35a8dec74.tar.xz zsh-f25a524da526b843c73e9febcf6987c35a8dec74.zip |
zsh-workers/7601
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/_arguments | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 4faf70246..17c4d3203 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -525,6 +525,8 @@ if [[ -z "$def" || "$def" = :* ]]; then # We either don't have a description for an argument of an option # or we have a description for a optional argument. + opt=yes + if [[ -z "$def" ]]; then # If we have none at all, use the one for this argument position. @@ -535,6 +537,7 @@ if [[ -z "$def" || "$def" = :* ]]; then optbeg="$nargbeg" argbeg="$nargbeg" fromrest=yes + [[ "$def" = \*::* ]] && opt='' fi fi @@ -542,8 +545,7 @@ if [[ -z "$def" || "$def" = :* ]]; then # be in a string that starts with an option name and continues with # the first argument, test that (again, two loops). - opt=yes - if (( $#dopts )); then + if [[ -n "$opt" && $#dopts -ne 0 ]]; then # Get the option names. |