feat(zsh): filter missing folders in path

This commit is contained in:
Michel 2024-11-05 10:07:48 +01:00
parent 4d39d0dd3e
commit 1ab3859b82

15
.zshrc
View File

@ -26,23 +26,22 @@ bindkey -A viins main
### Path ### Path
### ###
# Use 'nullglob' and "bi[n]" to filter missing folders
setopt nullglob setopt nullglob
path=( path=(
$HOME/bin $HOME{,/dev_local,/.local,/.local/*,/go}/bi[n]
$HOME/dev_local/bin
$HOME/.local/bin
$HOME/.local/*/bin
$HOME/go/bin
/opt/*/bin /opt/*/bin
$path) $path)
setopt nonullglob
fpath=( fpath=(
$fpath $fpath
/opt/zsh/site-functions /opt/zsh/site-function[s]
/usr/share/zsh/site-functions /usr/share/zsh/site-function[s]
) )
setopt nonullglob
# Remove duplicates # Remove duplicates
typeset -U path fpath typeset -U path fpath