diff options
| author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-01-27 10:06:55 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2015-01-27 11:02:57 +0000 |
| commit | 2c85612c4b395b41fb79b20504144da5d489c175 (patch) | |
| tree | a64f9b6ef2b6b2e8052d01da10704dd62cb10177 /Completion/Unix/Command | |
| parent | 34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY (diff) | |
| download | zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar.gz zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar.bz2 zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar.lz zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar.xz zsh-2c85612c4b395b41fb79b20504144da5d489c175.tar.zst zsh-2c85612c4b395b41fb79b20504144da5d489c175.zip | |
34412: complete all groups for chown under sudo
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_chown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown index 7a7e5911c..71c21da32 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -32,8 +32,8 @@ _arguments -C -s "$args[@]" '*:files:->files' && ret=0 case $state in owner) if [[ $service = chgrp ]] || compset -P '*[:.]'; then - if (( EGID && $+commands[groups] )); then # except for root - _wanted groups expl 'group' compadd $(groups) && return 0 + if (( EGID && $+commands[groups] && ! $+funcstack[(r)_sudo] )); then # except for root + _wanted groups expl 'group' compadd $(groups) && return 0 fi _groups && ret=0 else |
