Specify a command search path for sudo completion [Closes: issue1207]
authorFrank Terbeck <ft@bewatermyfriend.org>
Wed, 8 Aug 2012 06:15:13 +0000 (08:15 +0200)
committerFrank Terbeck <ft@bewatermyfriend.org>
Wed, 8 Aug 2012 06:15:13 +0000 (08:15 +0200)
Signed-off-by: Frank Terbeck <ft@bewatermyfriend.org>
etc/zsh/zshrc

index ca4b641..b7cb2e5 100644 (file)
@@ -1710,6 +1710,15 @@ grmlcomp() {
     zstyle ':completion:*:manuals.*'  insert-sections   true
     zstyle ':completion:*:man:*'      menu yes select
 
+    # Search path for sudo completion
+    zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
+                                               /usr/local/bin  \
+                                               /usr/sbin       \
+                                               /usr/bin        \
+                                               /sbin           \
+                                               /bin            \
+                                               /usr/X11R6/bin
+
     # provide .. as a completion
     zstyle ':completion:*' special-dirs ..