about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-12-15 09:11:49 -0600
committerStarfall <us@starfall.systems>2022-12-15 09:11:49 -0600
commit5f2a3ea313fd422ed166aa1ce15c748cb0ad6c54 (patch)
tree0c4429e40a0d813e2c444a0a658e531c0783d994
parent058b5486c402b492c2e384fb0a12417d78425121 (diff)
zsh: separate completions by category, stop exporting cdpath, use array format for cdpath
-rw-r--r--.config/zsh/.zshrc2
-rw-r--r--.config/zsh/completion.zsh4
2 files changed, 5 insertions, 1 deletions
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)
+# <https://superuser.com/a/286713>
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*:descriptions' format %B%d%b
 # enable completions
 autoload -Uz compinit && compinit