ajeetdsouza / zoxide

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

Enhancement: Support min_score in queries #853

Open ChilloManiac opened 1 week ago

ChilloManiac commented 1 week ago

This PR adds the -m flag to queries, allowing a user to specify directories to be discarded if they fall below a given threshold. Works both interactively and in list mode

Example usage

$ zoxide query -lsm4

$ zoxide query -im4
ajeetdsouza commented 5 days ago

Could you elaborate on the use case for this?

ChilloManiac commented 5 days ago

I use GNU stow to manage dotfiles and symlinks to them. Since i've been in both the stow and symlink dir, both show up when listing. But since i use one primarily the other one has a low score and i would like to discard it.

Furthermore i've created some vim Utilities that uses zoxide query -l {input} and display the results in an interactive picker. I would also like to be able to discard low scoring options from this list.

I figure other users could be using zoxide in a similar manner