diff options
-rw-r--r-- | bash/bashrc | 26 | ||||
-rw-r--r-- | sh/profile | 13 |
2 files changed, 15 insertions, 24 deletions
diff --git a/bash/bashrc b/bash/bashrc index 7338b64c..b551819d 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -106,21 +106,15 @@ if [[ $COMP_WORDBREAKS ]] ; then fi # Load any supplementary scripts -if [[ -d $HOME/.bashrc.d ]] ; then - for bashrc in "$HOME"/.bashrc.d/*.bash ; do - if [[ -e $bashrc ]] ; then - source "$bashrc" - fi - done - unset -v bashrc -fi +for bashrc in "$HOME"/.bashrc.d/*.bash ; do + [[ -e $bashrc ]] || continue + source "$bashrc" +done +unset -v bashrc # Load any completion files -if [[ -d $HOME/.bash_completion.d ]] ; then - for bashcmp in "$HOME"/.bash_completion.d/*.bash ; do - if [[ -e $bashcmp ]] ; then - source "$bashcmp" - fi - done - unset -v bashcmp -fi +for bashcmp in "$HOME"/.bash_completion.d/*.bash ; do + [[ -e $bashcmp ]] || continue + source "$bashcmp" +done +unset -v bashcmp @@ -4,11 +4,8 @@ if [ -d "$HOME"/.local/bin ] ; then fi # Load all supplementary scripts in ~/.profile.d -if [ -d "$HOME"/.profile.d ] ; then - for profile in "$HOME"/.profile.d/*.sh ; do - if [ -e "$profile" ] ; then - . "$profile" - fi - done - unset -v profile -fi +for profile in "$HOME"/.profile.d/*.sh ; do + [ -e "$profile" ] || continue + . "$profile" +done +unset -v profile |