diff options
| author | Oliver Kiddle <opk@zsh.org> | 2016-09-11 13:22:35 +0200 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2016-09-11 13:49:22 +0200 |
| commit | 8011fe8a582bd3c018a98e0e2c08f65233bcf0fc (patch) | |
| tree | ce6612c1e1bc5e6618b86e8d0b7b7743714b09c9 /Completion/Unix/Command/_sudo | |
| parent | 39252: internal: quotestring: Drop the 'e' parameter, which no caller uses. (diff) | |
| download | zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.gz zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.bz2 zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.lz zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.xz zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.zst zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.zip | |
39261 (tweaked cf. Daniel: 39275): don't unconditionally elevate privileges with sudo in completion functions
A new gain-privileges style enables it and a _comp_priv_prefix array
added for tracking how to match privileges for the current command
Diffstat (limited to 'Completion/Unix/Command/_sudo')
| -rw-r--r-- | Completion/Unix/Command/_sudo | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_sudo b/Completion/Unix/Command/_sudo index 63ac37f62..21b1ef4c6 100644 --- a/Completion/Unix/Command/_sudo +++ b/Completion/Unix/Command/_sudo @@ -48,7 +48,7 @@ else '(-H --set-home -i --login -s --shell -e --edit)'{-H,--set-home}"[set HOME variable to target user's home dir]" \ '(-P --preserve-groups -i -login -s --shell -e --edit)'{-P,--preserve-groups}"[preserve group vector instead of setting to target's]" \ '(-)1:command: _command_names -e' - '*::arguments: _normal' + '*::arguments:{ _comp_priv_prefix=( $words[1] -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) ; _normal }' ) fi |
