mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
39513: new doas completion
This commit is contained in:
parent
01f9e54c57
commit
573895dd60
2 changed files with 20 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
2016-09-30 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 39513: Completion/Unix/Command/_doas: new doas completion
|
||||
|
||||
* 39464: Completion/Solaris/Command/_fmadm: fix where lack
|
||||
of $state check caused unwanted filename completion
|
||||
|
||||
|
|
18
Completion/Unix/Command/_doas
Normal file
18
Completion/Unix/Command/_doas
Normal file
|
@ -0,0 +1,18 @@
|
|||
#compdef doas
|
||||
|
||||
local environ e cmd
|
||||
|
||||
zstyle -a ":completion:${curcontext}:" environ environ
|
||||
|
||||
for e in "${environ[@]}"
|
||||
do local -x "$e"
|
||||
done
|
||||
|
||||
cmd="$words[1]"
|
||||
_arguments -s -S \
|
||||
'(-n -s)-C+[check config file and report on command matching]:config:_files' \
|
||||
'(-C)-n[non-interactive: fail rather than prompt for a password]' \
|
||||
'-a+[specify authentication style]:authentication style' \
|
||||
'(-C)-s[run a shell]' \
|
||||
'-u+[run command as specified user]:user:_users' \
|
||||
'*::arguments:{ _comp_priv_prefix=( $cmd -n ${(kv)opt_args[-u]} ) ; _normal }'
|
Loading…
Reference in a new issue