mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
fix for automatically recognised options, don't expect an argument after each of them (12462)
This commit is contained in:
parent
d109322359
commit
81fc1bf26c
2 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2000-08-01 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12462: Completion/Base/_arguments: fix for automatically
|
||||
recognised options, don't expect an argument after each of them
|
||||
|
||||
* 12453: Completion/Bsd/_bsd_pkg, Completion/Bsd/_kld,
|
||||
Completion/Commands/_next_tags, Completion/User/_cvs,
|
||||
Completion/User/_mailboxes, Completion/X/_xset,
|
||||
|
|
|
@ -87,9 +87,11 @@ if (( long )); then
|
|||
done
|
||||
|
||||
# Then we walk through the descriptions plus a few builtin ones.
|
||||
# The last one matches all options; the `special' description and action
|
||||
# makes those options be completed without an argument description.
|
||||
|
||||
set -- "$@" '*=FILE*:file:_files' \
|
||||
'*=(DIR|PATH)*:directory:_files -/' '*: :'
|
||||
'*=(DIR|PATH)*:directory:_files -/' '*: : '
|
||||
|
||||
while (( $# )); do
|
||||
|
||||
|
@ -147,7 +149,7 @@ if (( long )); then
|
|||
|
||||
if (( $#tmp )); then
|
||||
tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
|
||||
if [[ -n "$descr" ]]; then
|
||||
if [[ -n "$descr" && "$descr" != ': : ' ]]; then
|
||||
cache=( "$cache[@]" "${(@)^tmp}${descr}" )
|
||||
else
|
||||
cache=( "$cache[@]" "$tmp[@]" )
|
||||
|
|
Loading…
Reference in a new issue