From 65684fc3e32dd487d5cbeff40b7488d4f7538ab8 Mon Sep 17 00:00:00 2001 From: Thomas Preisner Date: Sat, 15 Jul 2017 23:11:38 +0200 Subject: [PATCH] zsh: completion: ignore completer functions and expand wildcards --- zsh/completion.zsh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/zsh/completion.zsh b/zsh/completion.zsh index 6900b93..78d176d 100644 --- a/zsh/completion.zsh +++ b/zsh/completion.zsh @@ -57,6 +57,16 @@ zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-z}={A-Z}' zstyle -e ':completion:*:approximate:*' max-errors \ 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )' +# expand shell wildcards to all matching files after +zstyle ':completion:*:expand:*' tag-order all-expansions +# keep prefixed unexpanded if possible +zstyle ':completion:*:expand:*' keep-prefix on + +# ignore completion functions (until the _ignored completer) +zstyle ':completion:*:functions' ignored-patterns '_*' +# do not propose anything starting with '_' when offering typo corrections +CORRECT_IGNORE='_*' + # ===== completion appearance # use ls colors for completion zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" @@ -87,14 +97,9 @@ zstyle ':completion:*' menu select=1 _complete _ignored _approximate # Add simple colors to kill zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' -# insert all expansions for expand completer -# zstyle ':completion:*:expand:*' tag-order all-expansions - # offer indexes before parameters in subscripts zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters -# ignore completion functions (until the _ignored completer) -zstyle ':completion:*:functions' ignored-patterns '_*' zstyle '*' single-ignored show # apt-get recommendations