mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-07 23:51:14 +02:00
Alexey: 27789: use _arguments in _sudo
This commit is contained in:
parent
ec3f3e9eec
commit
7f3590c68f
2 changed files with 16 additions and 15 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-03-15 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
|
* Alexey: 27789: Completion/Unix/Command/_sudo: use _arguments.
|
||||||
|
|
||||||
2010-03-15 Peter Stephenson <pws@csr.com>
|
2010-03-15 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* 27780: Completion/Unix/Type/_files, Test/D04parameter.ztst:
|
* 27780: Completion/Unix/Type/_files, Test/D04parameter.ztst:
|
||||||
|
@ -12896,5 +12900,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.4929 $
|
* $Revision: 1.4930 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -25,21 +25,18 @@ args=(
|
||||||
'-S[read password from stdin]'
|
'-S[read password from stdin]'
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $service = sudoedit || -n $words[(R)-e] ]]; then
|
if [[ $service = sudoedit ]]; then
|
||||||
args+=(
|
_arguments $args \
|
||||||
'*:file: _files'
|
'*:file: _files'
|
||||||
)
|
|
||||||
else
|
else
|
||||||
args+=(
|
_arguments $args \
|
||||||
'-b[run command in background]'
|
'(- :)-e[edit file]:*:file:_files' \
|
||||||
'-E[preserve environment]'
|
'(- :)-s[run SHELL]' \
|
||||||
'-H[set HOME environment variable]'
|
'(- :)-i[simulate login]' \
|
||||||
'-P[preserve group vector]'
|
'(-i -s -e)-b[run command in background]' \
|
||||||
'(-i)-s[run SHELL]'
|
'(-i -s -e)-E[preserve environment]' \
|
||||||
'(-s)-i[simulate login]'
|
'(-i -s -e)-H[set HOME environment variable]' \
|
||||||
'(-):command name: _command_names -e'
|
'(-i -s -e)-P[preserve group vector]' \
|
||||||
|
'(-):command: _command_names -e' \
|
||||||
'*::arguments: _normal'
|
'*::arguments: _normal'
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_arguments $args
|
|
||||||
|
|
Loading…
Reference in a new issue