Open gi1242 opened 1 year ago
(Apologies; when I initially submitted my report my comment got deleted except for the first thre words. I edited my comment to include the fill report. Sorry if you got an almost blank issue report email notification.)
The change you're proposing isn't working for me. Instead of doing eval "$(zoxide init zsh)"
I've pasted the output of zoxide init zsh
in my zshrc and modified _files -/
to _cd
, but this doesn't fix it.
I want to complete the hello_world
directory by doing z hwo<TAB>
but that doesn't work.
This changes fixes the issue for me. Thanks @gi1242! @OrbitalHustler I needed to source the zoxide script after running autoload -Uz compinit
Thanks @ryankask ! Figured out my issue, I had to put my autoload -Uz compinit first, eval the updated function next, and finish by compinit -i -u
@ajeetdsouza any chance of this being added into zoxide? do you see an issue with this fix?
still doesn't work for me, not on my personal machine but it does work on my work one. both are MacOS, with identical config.
using z
works as expected
edit: I was able to make it work by using --no-cmd
and manually adding
\builtin alias cd=__zoxide_z
\builtin alias cdi=__zoxide_zi
to my config. weird. wondering if it'll work in my work box...
I've been doing this for the past while:
eval "${$(zoxide init zsh):s#_files -/#_cd#}"
alias cd=z
By default if I type
z <Tab>
, it shows me local directories twice.Moreover, if I have a local directory called
foo
, thenz o<Tab>
shows nothing; butcd o<Tab>
showsfoo
. (Alsoz f<Tab>
showsfoo
twice).This makes local directory completion worse than that of cd.
It can be fixed very easily: in
__zoxide_z_complete
, changeto
This will make the first argument of
z
complete local directories (exaclty likecd
), and leave everything else alone.