mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 11:01:13 +02:00
29783: _update-alternatives: Add more options.
This commit is contained in:
parent
346c4c46cc
commit
4264cab646
2 changed files with 34 additions and 19 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,12 @@
|
||||||
|
2011-12-14 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
|
* 30021: Completion/Zsh/Type/_globquals: Add d flag (see 29991),
|
||||||
|
show what unit the digits are entered in as a hint that the
|
||||||
|
default is also days.
|
||||||
|
|
||||||
|
* 29783: Completion/Debian/Command/_update-alternatives: Add
|
||||||
|
more options.
|
||||||
|
|
||||||
2011-12-13 Mikael Magnusson <mikachu@gmail.com>
|
2011-12-13 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
* 29998: Completion/Unix/Command/_git: fix a typo (--rerbose).
|
* 29998: Completion/Unix/Command/_git: fix a typo (--rerbose).
|
||||||
|
@ -5,10 +14,6 @@
|
||||||
* 30019: Completion/Unix/Command/_tar: fix parsing of argument
|
* 30019: Completion/Unix/Command/_tar: fix parsing of argument
|
||||||
to -C.
|
to -C.
|
||||||
|
|
||||||
* 30021: Completion/Zsh/Type/_globquals: Add d flag (see 29991),
|
|
||||||
show what unit the digits are entered in as a hint that the
|
|
||||||
default is also days.
|
|
||||||
|
|
||||||
2011-12-13 Barton E. Schaefer <schaefer@zsh.org>
|
2011-12-13 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 30020: Functions/Prompts/promptinit: prevent prompt_opts and
|
* 30020: Functions/Prompts/promptinit: prevent prompt_opts and
|
||||||
|
@ -15757,5 +15762,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5541 $
|
* $Revision: 1.5542 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -16,11 +16,21 @@ _arguments -C \
|
||||||
'--version' \
|
'--version' \
|
||||||
'--altdir:altdir:_files -/' \
|
'--altdir:altdir:_files -/' \
|
||||||
'--admindir:admindir:_files -/' \
|
'--admindir:admindir:_files -/' \
|
||||||
|
'--log:log file:_files -/' \
|
||||||
|
'--force' \
|
||||||
|
'--skip-auto' \
|
||||||
'--install:*::alt:= ->install' \
|
'--install:*::alt:= ->install' \
|
||||||
'--remove:*::alt:= ->remove' \
|
'--remove:*::alt:= ->remove' \
|
||||||
'--auto:name:_files -W $alterdir' \
|
'--remove-all:name:_files -W "$alterdir"' \
|
||||||
'--display:name:_files -W $alterdir' \
|
'--auto:name:_files -W "$alterdir"' \
|
||||||
'--config:name:_files -W $alterdir' && return
|
'--display:name:_files -W "$alterdir"' \
|
||||||
|
'--query:name:_files -W "$alterdir"' \
|
||||||
|
'--list:name:_files -W "$alterdir"' \
|
||||||
|
'--get-selections' \
|
||||||
|
'--set-selections' \
|
||||||
|
'--config:name:_files -W "$alterdir"' \
|
||||||
|
'--set:name:_files -W "$alterdir":path:_files -/' \
|
||||||
|
'--all' && return
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$state" in
|
case "$state" in
|
||||||
|
@ -28,29 +38,29 @@ while true; do
|
||||||
_call_function ret _update_alternatives_$state && return ret
|
_call_function ret _update_alternatives_$state && return ret
|
||||||
state=
|
state=
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
'1:link:_files' \
|
'1:link:_files' \
|
||||||
'2:name:_files -W $alterdir' \
|
'2:name:_files -W "$alterdir"' \
|
||||||
'3:path:_files' \
|
'3:path:_files' \
|
||||||
'--slave:*::more:= ->islave' && return
|
'--slave:*::more:= ->islave' && return
|
||||||
[[ -z $state ]] && return 1
|
[[ -z $state ]] && return 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
install)
|
install)
|
||||||
_call_function ret _update_alternatives_$state && return ret
|
_call_function ret _update_alternatives_$state && return ret
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
'1:link:_files' \
|
'1:link:_files' \
|
||||||
'2:name:_files -W $alterdir' \
|
'2:name:_files -W "$alterdir"' \
|
||||||
'3:path:_files' \
|
'3:path:_files' \
|
||||||
'4:priority:' \
|
'4:priority:' \
|
||||||
'--slave:*::slave:= ->islave' && return
|
'--slave:*::slave:= ->islave' && return
|
||||||
[[ -z $state ]] && return 1
|
[[ -z $state ]] && return 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
remove)
|
remove)
|
||||||
_call_function ret _update_alternatives_$state && return ret
|
_call_function ret _update_alternatives_$state && return ret
|
||||||
_arguments \
|
_arguments \
|
||||||
'1:name:_files -W $alterdir' \
|
'1:name:_files -W "$alterdir"' \
|
||||||
'2:path:_files'
|
'2:path:_files'
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue