From 2bf4b6e5446478f9b30a44caebdc1cdc7174597a Mon Sep 17 00:00:00 2001 From: Marcos Alano Date: Sun, 26 Apr 2015 17:06:05 -0300 Subject: [PATCH 1/3] Added auto-completion for external commands. --- lib/completion.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/completion.zsh b/lib/completion.zsh index 4b1bb0a62..89de099b4 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -32,6 +32,9 @@ else zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" fi +# auto-complete external commands +zstyle ':completion:*' rehash true + # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories From 3329122ba92272e0eee9a43860fde76af099fc62 Mon Sep 17 00:00:00 2001 From: ncanceill Date: Thu, 30 Apr 2015 14:06:48 +0200 Subject: [PATCH 2/3] add an option for completion auto-rehash --- lib/completion.zsh | 7 +++++-- templates/zshrc.zsh-template | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 89de099b4..94240fe8d 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -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 diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 763288dfd..ca452f276 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -28,6 +28,11 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" +# Uncomment the following line to force a rehash on every external completion +# request, so newly installed commands are automatically completed without +# reloading the shell. Be aware that this may impact completion performance. +# REHASH_COMPLETION="true" + # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories # much, much faster. From a1a1160352fff7d6a3e79a1f8c20d06e8350b644 Mon Sep 17 00:00:00 2001 From: Marcos Alano Date: Mon, 2 Nov 2015 19:17:51 -0200 Subject: [PATCH 3/3] Revert "Add an option for completion auto-rehash" --- lib/completion.zsh | 7 ++----- templates/zshrc.zsh-template | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 94240fe8d..89de099b4 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -32,11 +32,8 @@ else zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" fi -# rehash on every external command completion request -if [ "x$REHASH_COMPLETION" = "xtrue" ]; then - zstyle ':completion:*' rehash true - unset REHASH_COMPLETION -fi +# auto-complete external commands +zstyle ':completion:*' rehash true # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index ca452f276..763288dfd 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -28,11 +28,6 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" -# Uncomment the following line to force a rehash on every external completion -# request, so newly installed commands are automatically completed without -# reloading the shell. Be aware that this may impact completion performance. -# REHASH_COMPLETION="true" - # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories # much, much faster.