ajeetdsouza / zoxide

A smarter cd command. Supports all major shells.
MIT License
22.07k stars 537 forks source link

zoxide: no match found everywhere #745

Closed CaldwellYSR closed 7 months ago

CaldwellYSR commented 7 months ago

I'm on Ubuntu 20.04 and I installed zoxide via the install script.

> zoxide --version
zoxide 0.9.4

After installation I can z Documents/Games just fine but then if I try to z Games I get zoxide: no match found.

I've tried zoxide query -l to see what was in the database but it seems to just noop. Returns empty immediately.

It seems as if nothing is ever added to the database. I'm not sure what other information to include... below is an example of my attempt to z into a subdirectory. I've turned echo on for this example

✗ z Documents/Games/Godot/
/home/caldwellysr/Documents/Games/Godot

 ✗ z
/home/caldwellysr

 ✗ z Godot
zoxide: no match found
ajeetdsouza commented 7 months ago

What shell are you using? Have you added zoxide to the end of your config file?

CaldwellYSR commented 7 months ago

What shell are you using? Have you added zoxide to the end of your config file?

Oh I should have said... I'm using bash and no my zoxide is not guaranteed to be at the end... I can move it to the end to test.

EDIT Well yeah... moving it to the end fixes the issue. That's annoying. I try to keep my .bashrc pretty much empty and all my config files separate. Oh well I'll put it in bashrc.

CaldwellYSR commented 7 months ago

I can also fix the issue by loading my bashrc dotfiles in sorted order and making sure zoxide is last... Thanks for the help.

ajeetdsouza commented 7 months ago

Well yeah... moving it to the end fixes the issue.

The issue is that some other plugin / configuration is likely overriding your $PROMPT_COMMAND. zoxide handles this correctly, but other commands may not be doing so.