about summary refs log tree commit diff
path: root/Completion/Unix/Command/_ssh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-09-11 13:22:35 +0200
committerOliver Kiddle <opk@zsh.org>2016-09-11 13:49:22 +0200
commit8011fe8a582bd3c018a98e0e2c08f65233bcf0fc (patch)
treece6612c1e1bc5e6618b86e8d0b7b7743714b09c9 /Completion/Unix/Command/_ssh
parentf368720b8b9b481f82cef2e84a7e035864dff5f1 (diff)
downloadzsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.gz
zsh-8011fe8a582bd3c018a98e0e2c08f65233bcf0fc.tar.xz
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/_ssh')
-rw-r--r--Completion/Unix/Command/_ssh1
1 files changed, 1 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 7b2cdd8e1..5ee4fd2ad 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -605,6 +605,7 @@ _ssh () {
           hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96 && ret=0
       ;;
     command)
+      local -a _comp_priv_prefix
       shift 1 words
       (( CURRENT-- ))
       _normal