From f25a524da526b843c73e9febcf6987c35a8dec74 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Sep 1999 11:16:17 +0000 Subject: zsh-workers/7601 --- Completion/Base/_arguments | 6 ++++-- 1 file 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. -- cgit 1.4.1