From 2c85612c4b395b41fb79b20504144da5d489c175 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Tue, 27 Jan 2015 10:06:55 +0000 Subject: 34412: complete all groups for chown under sudo --- Completion/Unix/Command/_chown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion') 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 -- cgit 1.4.1