aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcd.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/lcd.sh b/lcd.sh
new file mode 100644
index 0000000..1494a10
--- /dev/null
+++ b/lcd.sh
@@ -0,0 +1,8 @@
+cd() {
+ builtin cd "$@"
+ pwd > ~/.lcd.dir
+}
+
+lcd() {
+ [ -e ~/.lcd.dir ] && cd "$( cat ~/.lcd.dir )"
+}