add an option for completion auto-rehash

This commit is contained in:
ncanceill 2015-04-30 14:06:48 +02:00 committed by Marcos Alano
commit 3329122ba9
2 changed files with 10 additions and 2 deletions

View file

@ -32,8 +32,11 @@ else
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
fi
# auto-complete external commands
zstyle ':completion:*' rehash true
# rehash on every external command completion request
if [ "x$REHASH_COMPLETION" = "xtrue" ]; then
zstyle ':completion:*' rehash true
unset REHASH_COMPLETION
fi
# disable named-directories autocompletion
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories