diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-26 08:44:13 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-26 08:44:13 +0000 |
commit | e7f910471143cfa56cc902e41c759ae91326f909 (patch) | |
tree | f1e253599078dec2288708214608136ed0043f36 /Completion/Base | |
parent | f90992ec3170a70a65d11ed9fd2aa4c6baaec3eb (diff) | |
download | zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.gz zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.xz 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/Base')
-rw-r--r-- | Completion/Base/_arguments | 9 |
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:# #}" |