diff --git a/bash/.bash_profile b/bash/.bash_profile index cfea67f..81fe6f0 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -2,25 +2,22 @@ # Adrian Abeyta # don't do anything if not running interactively -case $- in - *i*) ;; - *) return;; -esac +[[ $- != *i* ]] && return # include user home bins if they exist if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" -fi; +fi if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" -fi; +fi # load the dotfiles for file in ~/.{env,path,functions,aliases,prompt}; do [ -r "$file" ] && [ -f "$file" ] && \ source "$file"; done; -unset file; +unset file # fun scripts if is_true "${HAVE_FUN:-}"; then @@ -35,4 +32,4 @@ shopt -s checkwinsize # update col/line values on each command # enable tab completion for 'g' by marking as alias for 'git' if type _git &> /dev/null; then complete -o default -o nospace -F _git g; -fi; +fi diff --git a/bash/.bashrc b/bash/.bashrc index 1257002..db43581 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1 +1 @@ -[ -n "$PS1" ] && source ~/.bash_profile; +[ -n "$PS1" ] && [[ -f ~/.bash_profile ]] && source ~/.bash_profile;