From 5f2a3ea313fd422ed166aa1ce15c748cb0ad6c54 Mon Sep 17 00:00:00 2001 From: Starfall Date: Thu, 15 Dec 2022 09:11:49 -0600 Subject: zsh: separate completions by category, stop exporting cdpath, use array format for cdpath --- .config/zsh/.zshrc | 2 +- .config/zsh/completion.zsh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 09ae41f..aa5e149 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -33,7 +33,7 @@ fi # magic navigation setopt autocd -export CDPATH=".:$HOME:$HOME/devil:$HOME/src" +cdpath=(. $HOME $HOME/devil $HOME/src) alias -g ...='../..' alias -g ....='../../..' alias -g .....='../../../..' diff --git a/.config/zsh/completion.zsh b/.config/zsh/completion.zsh index bbaacba..0914ea2 100644 --- a/.config/zsh/completion.zsh +++ b/.config/zsh/completion.zsh @@ -13,5 +13,9 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' # cache completions zstyle ':completion::complete:*' use-cache yes zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache" +# group names (e.g. separate cdpath from current directory) +# +zstyle ':completion:*' group-name '' +zstyle ':completion:*:descriptions' format %B%d%b # enable completions autoload -Uz compinit && compinit -- cgit