summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_chown4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a183c5086..4f8fdf8da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-27 Peter Stephenson <p.stephenson@samsung.com>
+
+ * Daniel Shahaf: 34412: Completion/Unix/Command/_chown: complete
+ all groups if running as sudo.
+
2015-01-27 Mikael Magnusson <mikachu@gmail.com>
* 34382: Src/module.c: Handle NULL return from dlerror() more
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