aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-01-25 16:40:35 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-01-25 16:40:35 -0800
commitc8b9b6cfa55bf734a64efcb755e1203d911bdbff (patch)
tree3df2ec6d9bcb73638c2d76d2a816f3fbe37acdd7
parent61d64610191d29a2b058d5d5011b4a3710ad2aa1 (diff)
downloadcdlog-c8b9b6cfa55bf734a64efcb755e1203d911bdbff.tar.gz
cdlog-c8b9b6cfa55bf734a64efcb755e1203d911bdbff.tar.bz2
cdlog-c8b9b6cfa55bf734a64efcb755e1203d911bdbff.zip
print new PWD in pd and cs.
* cdlog.sh (cdlog.rot, cdlog.pop): Print new current directory if change successful.
-rw-r--r--cdlog.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/cdlog.sh b/cdlog.sh
index 47566c7..0f0471c 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -67,6 +67,7 @@ cdlog.rot()
( [1-9] )
if [ $first ] ; then
command cd "${d[$n]}" || return
+ printf "%s\n" "$PWD"
else
d[$p]=${d[$n]}
fi
@@ -98,6 +99,8 @@ cdlog.pop()
c9=
cdlog.nicks
+
+ printf "%s\n" "$PWD"
fi
}