mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
make _arguments --' use specs after the
--' even for options not described in the help output to get arguments (12378)
This commit is contained in:
parent
f90992ec31
commit
e7f9104711
2 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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:# #}"
|
||||
|
|
Loading…
Reference in a new issue