aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-10-06 06:18:15 -0400
committerB. Watson <urchlay@slackware.uk>2026-10-06 06:18:15 -0400
commit926f8d0b3638f30078c2ae78068aa8c42fc6f662 (patch)
tree95c8607c157e48f9208e6b7455e9f1e67405f186
parent042f87ae70695db19cec1cf97dc28e6aa91d3901 (diff)
downloadmisc-scripts-926f8d0b3638f30078c2ae78068aa8c42fc6f662.tar.gz
lcd.sh: added (linked cd command).
-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 )"
+}