Skip to content

zoxide: no match found can be too easily confused with zoxide: command not found #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AltiorRonan opened this issue Dec 7, 2024 · 2 comments

Comments

@AltiorRonan
Copy link

When you type a command like z an-absoloutly-unkown-directory, the response is zoxide: no match found which can be too easily confused with the fact that the command z does not exist (zoxide: command not found).

A better message would be: zoxide: no match found for 'an-absoloutly-unkown-directory' which is a better distinction between zoxide vs OS error message.

@azaleacolburn
Copy link
Contributor

azaleacolburn commented Mar 15, 2025

Generally, I agree. One issue with this though is that multiple keywords can be used in a query, e.g., zoxide foo bar.

I propose that it be formatted as such:
zoxide: no match found for 'foo' and 'bar'.

@ajeetdsouza
Copy link
Owner

That seems to me like it would be very verbose. It's also redundant, since the query on most shells would be visible right above the error:

$ z foo bar
zoxide: no match found for 'foo bar'

It would also be slightly confusing in places:

$ z "foo bar" baz
zoxide: no match found for '"foo bar" baz'

Lastly, the case we're optimizing for (zoxide: command not found) seems like it would not happen very often on most setups - it seems like we're optimizing for 1% of situations at the expense of the remaining 99%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants