4 ms·
I use my "dc" command to reverse "cd" frequently https://gist.github.com/GNOMES/6bf65926648e260d8023aebb9ede9573 https://gist.github.com/GNOMES/6bf65926648e260d
by GNOMES 11mo ago
I use my "dc" command to reverse "cd" frequently
https://gist.github.com/GNOMES/6bf65926648e260d8023aebb9ede9573 https://gist.github.com/GNOMES/6bf65926648e260d8023aebb9ede9...
Ex:
> echo $PWD
/foo/bar/batz/abc/123
> dc bar && echo $PWD
/foo/bar
Useful for times when I don't want to type a long train of dot slashes(ex. cd ../../..).
Also useful when using Zoxide, and I tab complete into a directory tree path where parent directories are not in Zoxide history.
Added tab complete for speed.
- rkomorn 11mo agoThat's pretty neat. Nice.
- ratrocket 11mo agoHas "dc" the calculator fallen this far out of favor?! :) > dc is the oldest surviving Unix language program. https://en.wikipedia.org/wiki/Dc_%28computer_program%29 https://en.wikipedia.org/wiki/Dc_%28computer_program%29 I used "dc" (the calculator) just earlier this week. Kids these days? :)