aboutsummaryrefslogtreecommitdiff
path: root/.config/shell/.bashrc
diff options
context:
space:
mode:
authorkj-sh6042024-07-17 22:27:14 -0400
committerkj-sh6042024-07-17 22:27:14 -0400
commitfe0f355277b220f304b2e58695349add20741e91 (patch)
treef140ce64ac2bc7bf124a74bf81ca0bdb6c4446ee /.config/shell/.bashrc
parent311ea8ad7c5049ac9efec309b35073b19638054b (diff)
feat: new POSIX and fish functions
Diffstat (limited to '.config/shell/.bashrc')
-rw-r--r--.config/shell/.bashrc13
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