Improbe zsh's fpath handling
This commit is contained in:
parent
6ea5f89bb4
commit
c8c218f860
|
@ -8,10 +8,17 @@ if [[ "${BASE_SHELL}" == "zsh" ]]; then
|
|||
mkdir -p $ZSH_CACHE_DIR/completions
|
||||
mkdir -p "$HOME/.local/share/zsh/completions"
|
||||
|
||||
[ -d "$HOME/.local/share/zsh/completions" ] && fpath=(
|
||||
$HOME/.local/share/zsh/completions
|
||||
$fpath
|
||||
)
|
||||
# Remove duplicates from fpath, and add local completion dir
|
||||
fpath=( $(
|
||||
for d in $(
|
||||
awk '!seen[$0]++' <(
|
||||
echo "$HOME/.local/share/zsh/completions"
|
||||
printf '%s\n' $fpath
|
||||
)
|
||||
); do
|
||||
[ -d "$d" ] && echo "$d"
|
||||
done
|
||||
) )
|
||||
|
||||
skip_global_compinit=1
|
||||
|
||||
|
|
Loading…
Reference in New Issue