use zsh globbing to add ~/.local/bin to $PATH

find is slow, instead use zsh globbing to add '~/.local/bin' to $PPATH
as it achieves the same effect but runs faster, plus the substitution
that was used in the previous command is actually a bad substitution
This commit is contained in:
KronikPillow 2021-03-30 20:46:08 +02:00
parent 185248c4af
commit 42916ef068
No known key found for this signature in database
GPG Key ID: E4A0CE24DAD6B3FE

View File

@ -5,8 +5,9 @@
# If you don't plan on reverting to bash, you can remove the link in ~/.profile
# to clean up.
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}"
# Adds `~/.local/bin` to $PATH recursively
typeset -U path
path+=(~/.local/bin{,/**/*(N/)})
unsetopt PROMPT_SP