mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +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>
|
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
|
* users/3337: Completion/Base/_value: allow _value:<assoc> functions to
|
||||||
override completion for all keys of an assoc
|
override completion for all keys of an assoc
|
||||||
|
|
||||||
|
|
|
@ -142,11 +142,16 @@ if (( long )); then
|
||||||
cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" )
|
cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" )
|
||||||
fi
|
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
|
if (( $#tmp )); then
|
||||||
tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
|
tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
|
||||||
cache=( "$cache[@]" "$tmp[@]" )
|
if [[ -n "$descr" ]]; then
|
||||||
|
cache=( "$cache[@]" "${(@)^tmp}${descr}" )
|
||||||
|
else
|
||||||
|
cache=( "$cache[@]" "$tmp[@]" )
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
set -A "$name" "${(@)cache:# #}"
|
set -A "$name" "${(@)cache:# #}"
|
||||||
|
|
Loading…
Reference in a new issue