Add path check before adding to user path
Closed this issue · 1 comments
Archangel33 commented
I am currently tweaking my zsh config, and in turn sourcing my .zshrc quite often, and I noticed the path to this plugins bin directory is being added multiple times to my PATH variable. I took a quick look, and I think there should be a check for if the bin path is already present on the user path before adding it to the users PATH variable. I believe this line:
fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh
Line 17 in 480cbd0
should be wrapped with a check, something like this:
if [[ ! "$path" == *${FZF_PLUGIN_BIN}* ]]; then
path+=(${FZF_PLUGIN_BIN})
fi
unixorn commented
TIL, I'll have to update my other plugins too.