zoxide icon indicating copy to clipboard operation
zoxide copied to clipboard

Enhancement: Support min_score in queries

Open ChilloManiac opened this issue 1 year ago • 3 comments

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

ChilloManiac avatar Jul 05 '24 09:07 ChilloManiac

Could you elaborate on the use case for this?

ajeetdsouza avatar Jul 12 '24 05:07 ajeetdsouza

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

ChilloManiac avatar Jul 12 '24 08:07 ChilloManiac

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

I have this exact setup aswell! Would be nice to be able to simplify my wonky hacks to remove low scores

Simmetopia avatar Jul 31 '24 09:07 Simmetopia