News for hackers. Stuff that matters.
Re:How to navigate directories faster with Bash (2015) by alpb on Thursday April 22, 2021 @12:49PM (#26904921)
The most important tool I found for switching directories is called "z". You just partially type a previously visited directory's name and it takes you there. It also keeps track of your history to rank candidates for popularity. https://github.com/rupa/z/ It's basically CDPATH on stereoids and doesn't require preconfiguration like CDPATH.
Re:How to navigate directories faster with Bash (2015) by Hiopl on Thursday April 22, 2021 @02:20PM (#26906077)
I largely despised the commandline until I discovered z. Then I realized there are ways to make the commandline actually usable and it became an incredible, useful and user-friendly tool for me.
Re:How to navigate directories faster with Bash (2015) by stjohnswarts on Thursday April 22, 2021 @05:04PM (#26908171)
Similar is https://lib.rs/crates/zoxide if you're a fan of rust based solutions :) .
Re:How to navigate directories faster with Bash (2015) by alpb on Thursday April 22, 2021 @07:42PM (#26909471)
I don't think zoxide keeps an eye on shell history or uses a shell hook to see which dirs you navigate to manually? It seems it collects history only through its own CLI?
Re:How to navigate directories faster with Bash (2015) by stjohnswarts on Friday April 23, 2021 @12:56AM (#26911102)
You're wrong it watches what you do and where you go via the shell command history file.