From 42916ef0686c0488a7362f0d70ce21ae415283a7 Mon Sep 17 00:00:00 2001 From: KronikPillow Date: Tue, 30 Mar 2021 20:46:08 +0200 Subject: [PATCH] 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 --- .config/shell/profile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/shell/profile b/.config/shell/profile index 9515179d..1d75cd07 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -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