diff options
| author | kj-sh604 | 2024-07-17 22:27:14 -0400 |
|---|---|---|
| committer | kj-sh604 | 2024-07-17 22:27:14 -0400 |
| commit | fe0f355277b220f304b2e58695349add20741e91 (patch) | |
| tree | f140ce64ac2bc7bf124a74bf81ca0bdb6c4446ee /.config/shell/.bashrc | |
| parent | 311ea8ad7c5049ac9efec309b35073b19638054b (diff) | |
feat: new POSIX and fish functions
Diffstat (limited to '.config/shell/.bashrc')
| -rw-r--r-- | .config/shell/.bashrc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/shell/.bashrc b/.config/shell/.bashrc index 10d0a4b..286afd9 100644 --- a/.config/shell/.bashrc +++ b/.config/shell/.bashrc @@ -71,4 +71,17 @@ 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 |
