3 ms·
For a simpler worflow than "j" one can use pushd/popd which are builtin in bash. One can push and pop directories one a stack. It's pretty neat! $ cd foo1 $ p
by cpa 14y ago
For a simpler worflow than "j" one can use pushd/popd which are builtin in bash. One can push and pop directories one a stack. It's pretty neat!
$ cd foo1
$ pushd ~/foo2
[do some work]
$ pushd ~/foo3
[do some work]
$ popd
$ pwd
~/foo2
$ popd
$ pwd
~/foo1
- izakage 14y agoThere's also "dirs" to view the directory stack!
- cpeterso 14y agoYou can also: $ cd - to jump to the last directory, like popd without the pushd. I also alias .. to 'cd ..' and ... to 'cd ../..' (and so on).
- SoftwareMaven 14y agopushd without an argument will cycle through the directory stack as well.