diff --git a/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env b/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env index 772818f..be73805 100644 --- a/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env +++ b/_home/private_dot_config/sz.env/aaa_zsh_0_perp.env @@ -8,11 +8,18 @@ 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 # # Jump to the bottom of the screen