diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Base/_arguments | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 562f3905a..cd46f86b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-07-26 Sven Wischnowsky <wischnow@zsh.org> + * 12378: Completion/Base/_arguments: make `_arguments --' use + specs after the `--' even for options not described in the help + output to get arguments + * users/3337: Completion/Base/_value: allow _value:<assoc> functions to override completion for all keys of an assoc 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:# #}" |