diff --git a/bash_rc b/bash_rc index ad9cba4..823813a 100755 --- a/bash_rc +++ b/bash_rc @@ -16,7 +16,14 @@ fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= -export PATH="${PATH}:${HOME}/bin:/usr/local/bin:/usr/local/sbin" +# Local bin folders in path +if [ -d /usr/local/bin ]; then + export PATH="${PATH}:/usr/local/bin" +fi + +if [ -d /usr/local/sbin ]; then + export PATH="${PATH}:/usr/local/sbin" +fi # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. diff --git a/bashrc.d/user_bin b/bashrc.d/user_bin new file mode 100644 index 0000000..f65c5a3 --- /dev/null +++ b/bashrc.d/user_bin @@ -0,0 +1,10 @@ +#!/bin/bash +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi