From 17159b20c11bb6f3e87bb2ae1d271a49a02edcb5 Mon Sep 17 00:00:00 2001 From: Lucas Wilson-Richter Date: Sun, 19 May 2024 22:15:55 +1000 Subject: [PATCH] Add an init script for the shell Since I imagine there will be more of this kind of thing --- init.bash | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 init.bash diff --git a/init.bash b/init.bash new file mode 100644 index 0000000..9bc46e2 --- /dev/null +++ b/init.bash @@ -0,0 +1,6 @@ +# Source this into your shell config, e.g. ~/.zshrc + +# Bash scripts can't change the working directory of their callers. This is +# right and proper, but we need to work around it in this case. +# +repo () { cd $($(dirname ${BASH_SOURCE[0]})/repo $@) }