Comment by GNOMES
1 year ago
I use my "dc" command to reverse "cd" frequently 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.
That's pretty neat. Nice.
Has "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
I used "dc" (the calculator) just earlier this week. Kids these days? :)