Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I've been trying it recently and I'm not entirely convinced I want to keep using it.

My biggest annoyance at the moment (and this may be me missing something), is that I have two directories: "thing" and "thing-api". I'm doing work in "thing" much more often than in the "thing-api", but whenever I run "z thing", it takes me to "thing-api" first, and I have to "z thing" again to get to where I wanted to go. It ends up being more effort than if I'd just tab-completed or history searched a plain cd command.





Perhaps helpful: There's also a `zi` command, which prompts you with a list of all matches before changing directories. Personally there's only few directories where I need it, and I just memorize using zi instead of z for those.

However I agree z should ideally have some syntax like `thing$` to denote a full directory name instead.


Yeah I aliased zi to z for this reason. z feels too much like a lottery ticket.

> Yeah, I've been trying it recently and I'm not entirely convinced I want to keep using it.

> My biggest annoyance at the moment (and this may be me missing something), is that I have two directories: "thing" and "thing-api". I'm doing work in "thing" much more often than in the "thing-api", but whenever I run "z thing", it takes me to "thing-api" first, and I have to "z thing" again to get to where I wanted to go. It ends up being more effort than if I'd just tab-completed or history searched a plain cd command.

AFAIK the z command does take frequency into account (or was it most recent visit). However to avoid going into thing-api instead of thing I believe you just type thing/ i.e. At the slash and z will take you to thing (that obviously doesn't work with tab completion though).

I found that after some time I have gotten so used to z (which I aliases to cd) that I wouldn't want to live without it.


The aha moment for me was to type a space after the characters I'm searching for - then hit tab. You then get the list of options ranked (and a nice view showing the contents of each folder).

zoxide stores a rank for each directory based on how often you visit it, but you can manually adjust the scores.

Run `zoxide query -ls thing` to see the scores, and `zoxide add thing -s AMOUNT` to increase the score.


That's good to know, when I needed to raise the score for a directory I just did a bunch of `cd .`

(⌐■_■)

If xkcd took comment form, this would be it.

I wrote a shell keybinding that presents me with the candidates using fzf (in rank order). This way I can see which one it will go to and pick the "correct" one if need be. It's blazing fast.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: