Skip to content
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

Easier flow for bumping path to be top result for query #849

Open
leumasme opened this issue Jun 20, 2024 · 0 comments
Open

Easier flow for bumping path to be top result for query #849

leumasme opened this issue Jun 20, 2024 · 0 comments

Comments

@leumasme
Copy link

The situation:

z temp is returning /path/template-project.
It is desired that it instead returns /path/temporary

The current solution from what I found:

Enter the zoxide edit UI and manually increase the rank of /path/temporary until it is above /path/template-project
This is a bit clunky because it requires

  • using a separate 'long' command to open the TUI
  • manually finding both of the paths in question in the (huge) list
  • manually increasing the rank until it matches

A more desirable flow for this situation:

Some way to specify the query and the path that is desired to be the topmost. Zoxide would then automatically

  • determine the score of the top result for the query
  • bump the given path to be greater than the found score

If feasible with the TUI library, a nice way of accomplishing this would be to have a specific hotkey (e.g. shift-enter) in the interactive query zi to bump the selected entry to the top of the current query.
This solution is desirable because

  • It uses an existing command (with a short alias) which is already part of the existing natural flow in this situation
    • z navigates to wrong directory -> use zi to pick the correct one (+ now: have the option to effectively persist this choice)
  • It doesn't require the user to specify the full path to bump (vs a cli solution such as zoxide bump <query> <path>)

Please let me know if I have missed something and there is already an easier way than the current solution as I wrote it.
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

1 participant