Re:Command Line Tools I Like (2022)
by gigatexal on Wednesday October 09, 2024 @05:17PM
(#41792747)
Zoxide looks really cool
[ Parent
| on HN ]
Re:Command Line Tools I Like (2022)
by marcinreal on Wednesday October 09, 2024 @07:08PM
(#41793777)
I didn't like frecency in this and similar tools. I would often get put in directories that I didn't want. I wrote my own simple script that just uses recency, and if there's multiple possible matches you get to choose which one you want (though this is configurable).
> I would often get put in directories that I didn't want.
I solved this by combining it with fzf. Get all the directories you've ever visited and pass on to fzf (sorted by frequency). Then do your matching. You can trivially see if the match is taking you where you want. If not it is likely the second or third match. You're no longer constrained to navigating only to the top matched directory.
I have this bound to a keystroke in my shell.
Re:Command Line Tools I Like (2022)
by I_complete_me on Thursday October 10, 2024 @07:30AM
(#41797768)
I use dirjump [1] for this. I use zoxide alongside it.
[1] https://github.com/imambungo/dirjump
I adore it. `z <project I'm working on>` is my brain's hardwired shortcut to get back to what I was doing.
Pair it with dotenv to automatically set my my shell environment for that project, whatever it is I'm doing at the moment, and it's sooo ergonomic to bounce around between tasks.
It is a simple tool, yet it makes a day-and night difference when traversing directories.
Re:Command Line Tools I Like (2022)
by elmariachi on Wednesday October 09, 2024 @06:26PM
(#41793409)
It is! It's saved me quite a bit of typing since I started using it.
Re:Command Line Tools I Like (2022)
by darkteflon on Wednesday October 09, 2024 @11:48PM
(#41795319)
I used and loved z for years but migrated to zsh-z (https://github.com/agkozak/zsh-z) when MacOS switched the default shell and it became apparent that z wouldn’t be compatible with it.
Anyone have a view on whether I should switch from zsh-z (~2k gh stars) to Zoxide (~22k stars)?