Skip to main content
Toggle navigation
Friendica
Search
2022-05-29 17:01:00
2022-05-28 11:05:35
2022-05-28 11:01:14
374564
Yes, I Know IT ! π
1 year ago
•
•
Yes, I Know IT ! π
1 year ago
•
•
From a POSIX shell `$OLDPWD` holds the name of the previous working directory:
cd /tmp
echo You are here: $PWD
echo You were here: $OLDPWD
cd $OLDPWD
#
Unix
#
Linux
#
Shell
#
cd
#
linux
#
shell
#
unix
#
cd
Languages
Share via ...
Peter Vágner
likes this.
in reply to Yes, I Know IT ! π
Aral Balkan
in reply to Yes, I Know IT ! π
•
1 year ago
•
•
Neat :) Not being POSIX that doesnβt work for me in Fish shell but Alt+left-arrow goes to the previous working directory and Alt+right-arrow goes to the next.
#
fishShell
#
cd
#
linux
#
unix
#
linux
#
unix
#
fishshell
#
cd
Languages
Share via ...
in reply to Aral Balkan
~/hyde
in reply to Aral Balkan
•
1 year ago
•
•
% cd -
should go to the previous directory too.
Languages
Share via ...
in reply to ~/hyde
Aral Balkan
in reply to ~/hyde
•
1 year ago
•
•
Ah, yes, Iβd misremembered it as cd -1 yesterday while trying out the posix stuff in fish and was wondering why it wasnβt working :)
Languages
Share via ...
in reply to Aral Balkan
~/hyde
in reply to Aral Balkan
•
1 year ago
•
•
with zsh, it works with cd -1 too π
Languages
Share via ...
in reply to ~/hyde
Aral Balkan
in reply to ~/hyde
•
1 year ago
•
•
Ah, then thatβs where I remember it from. I was on zsh before fish :)
Languages
Share via ...
β§
Aral Balkan
in reply to Yes, I Know IT ! π • • •#fishShell #cd #linux #unix
~/hyde
in reply to Aral Balkan • • •should go to the previous directory too.
Aral Balkan
in reply to ~/hyde • • •~/hyde
in reply to Aral Balkan • • •Aral Balkan
in reply to ~/hyde • • •