Add zstyle for sudo completion
authorMikael Berthe <mikael@lilotux.net>
Sun, 28 Feb 2016 17:06:21 +0100
changeset 35 c6d405e0684b
parent 34 f4fd388eb9a0
child 36 89707240553f
Add zstyle for sudo completion We need to use root system path.
zshrc.d/15-completion.zrc
--- a/zshrc.d/15-completion.zrc	Sun Feb 28 17:05:08 2016 +0100
+++ b/zshrc.d/15-completion.zrc	Sun Feb 28 17:06:21 2016 +0100
@@ -38,6 +38,15 @@
 zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
 zstyle ':completion:*' substitute 1
 
+# From Debian' system zshrc
+zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
+                                           /usr/local/bin  \
+                                           /usr/sbin       \
+                                           /usr/bin        \
+                                           /sbin           \
+                                           /bin            \
+                                           /usr/X11R6/bin
+
 autoload -Uz compinit
 compinit