summaryrefslogtreecommitdiffstats
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-26 08:44:13 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-26 08:44:13 +0000
commite7f910471143cfa56cc902e41c759ae91326f909 (patch)
treef1e253599078dec2288708214608136ed0043f36 /Completion
parentallow _value:<assoc> functions to override completion for all keys of an asso... (diff)
downloadzsh-e7f910471143cfa56cc902e41c759ae91326f909.tar
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.gz
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.bz2
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.lz
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.xz
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.zst
zsh-e7f910471143cfa56cc902e41c759ae91326f909.zip
make `_arguments --' use specs after the `--' even for options not described in the help output to get arguments (12378)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_arguments9
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index a5a39112a..4f33048e0 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -142,11 +142,16 @@ if (( long )); then
cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" )
fi
- # Everything else is just added as an option without arguments.
+ # Everything else is just added as an option without arguments or
+ # as described by $descr.
if (( $#tmp )); then
tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
- cache=( "$cache[@]" "$tmp[@]" )
+ if [[ -n "$descr" ]]; then
+ cache=( "$cache[@]" "${(@)^tmp}${descr}" )
+ else
+ cache=( "$cache[@]" "$tmp[@]" )
+ fi
fi
done
set -A "$name" "${(@)cache:# #}"