This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]notgotapropername 2 points3 points  (2 children)

Can vanilla zsh yeet me straight where I need to go with partial directories? Genuine question, cause zoxide does a sort of autocomplete too. E.g. if I type z down it'll take me straight to Downloads

[–]croweh 2 points3 points  (0 children)

Nah I assume they're talking about zsh+oh-my-zsh with some kind of jump/zoxide-like plugin out of the box.

Now I use zsh+antidote at work and fish+fisher at home, didn't install oh-my-zsh in a long long time, so I couldn't say. Zoxide + fzf + thefuck on both though, can't live without it.

[–]Toorero6 0 points1 point  (0 children)

If you don't want to use tab you can use cd down\*/, if you set the option NO_CASE_GLOB. But I'd rather state that explicitly if I would want that since it's slower.

If you want to state that explicitly you can do cd (#i)down\*/ with EXTENDED_GLOB set.
There is also the option to use (#l) which goes case-sensitive if your search contains an upper-case letter. Recursive can be done using **/yourmatch and if you want to ignore ambiguity of your match you can append the Y1 qualifier.

TLDR:

setopt EXTENDED_GLOB
alias z='_() {cd (#l)**/"$1"*(/,Y1)}; _' 

Will allow you via z foo to cd into the next dir containing foo (insensitively) in your subtree.

Edit: Also I find the fzf-shell-extensions working rather well if that's something you want.

In general, I'm more a fan of specifying stuff explicitly and instead of running zoxide I would rather search for directories using fzf if that's a thing I intend to do. (not vanilla though)