]> code.delx.au - dotfiles/commitdiff
bash: ~/bin should go at the front of PATH
authorJames Bunton <jamesbunton@delx.net.au>
Thu, 18 Jun 2020 13:26:29 +0000 (23:26 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Thu, 18 Jun 2020 13:26:29 +0000 (23:26 +1000)
.bashrc

diff --git a/.bashrc b/.bashrc
index 3cdd83ca39fda8315525605f404db8a0f7ddb643..318ee58c062c5acb63d5be0849f1e620b22de791 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -15,7 +15,7 @@ fi
 # Add ~/bin and subdirs to PATH if needed
 while read -r p; do
     echo "$PATH" | tr ':' '\n' | grep -qxF "$p" || PATH="${p}:$PATH"
-done < <(find -L ~/bin -maxdepth 1 -type d 2> /dev/null)
+done < <(find -L ~/bin -depth -maxdepth 1 -type d 2> /dev/null)
 
 # Set environment variables, eg EMAIL, LANG
 eval "$(cat 2> /dev/null /etc/default/locale /etc/locale.conf ~/.config/environment.d/*.conf | awk -F= '/^[^# ]/ {print $0 ";export " $1}')"