diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2008-10-10 09:56:25 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2008-10-10 09:56:25 +0000 |
commit | 7783d398c3e9a33790530d14de72c0ea50cabe36 (patch) | |
tree | e2d4a7c2973fa8351274d36e0894c6728850a682 /Completion/Unix/Command | |
parent | f1628c32788039657e190b17a2ce0013c0a7892e (diff) | |
download | zsh-7783d398c3e9a33790530d14de72c0ea50cabe36.tar.gz zsh-7783d398c3e9a33790530d14de72c0ea50cabe36.tar.xz zsh-7783d398c3e9a33790530d14de72c0ea50cabe36.zip |
25029: : "environ" style to allow a different search path when completing
as a different user.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_sudo | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_sudo b/Completion/Unix/Command/_sudo index 2b5a5cb7d..b4c002168 100644 --- a/Completion/Unix/Command/_sudo +++ b/Completion/Unix/Command/_sudo @@ -1,5 +1,12 @@ #compdef sudo +local curcontext="$curcontext" environ e +zstyle -a "$curcontext" environ environ + +for e in "${environ[@]}" +do local -x "$e" +done + _arguments \ '-V[show version]' \ '-l[list allowed commands]' \ |