diff options
Diffstat (limited to '.config/shell/.bashrc')
| -rw-r--r-- | .config/shell/.bashrc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/.config/shell/.bashrc b/.config/shell/.bashrc index 286afd9..8782090 100644 --- a/.config/shell/.bashrc +++ b/.config/shell/.bashrc @@ -1,6 +1,21 @@ # note: this file needs to be sourced in /etc/bash.bashrc -. ~/.config/shell/git-prompt.sh +# personal QOL functions +source_if_exists() { + [ -f "$1" ] && source "$1" +} + +ensure_directory_and_file() { + [ ! -d "$1" ] && mkdir -p "$1" + [ ! -f "$2" ] && touch "$2" +} + +# Source personal POSIX functions +source_if_exists ~/.config/shell/posix-functions/create_POSIX_dotenv.sh +source_if_exists ~/.config/shell/posix-functions/POSIX_open.sh + +# git prompt +source_if_exists ~/.config/shell/git-prompt.sh export GIT_PS1_SHOWDIRTYSTATE=1 if [[ $- != *i* ]] ; then @@ -71,17 +86,4 @@ done unset use_color sh -source_if_exists() { - [ -f "$1" ] && source "$1" -} - -ensure_directory_and_file() { - [ ! -d "$1" ] && mkdir -p "$1" - [ ! -f "$2" ] && touch "$2" -} - -# Source personal POSIX functions -source_if_exists ~/.config/shell/posix-functions/create_POSIX_dotenv.sh -source_if_exists ~/.config/shell/posix-functions/POSIX_open.sh - export HISTFILE="$XDG_STATE_HOME"/shell/history |
