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

[feature request] disable picker by using exact match #59

Open
andrewcrook opened this issue Aug 2, 2023 · 8 comments
Open

[feature request] disable picker by using exact match #59

andrewcrook opened this issue Aug 2, 2023 · 8 comments

Comments

@andrewcrook
Copy link

Would be good to have an option to disable the picker to use an exact match instead

@Artturin
Copy link
Member

So , --exact hello should not open the picker but instead pick hello.out ?

@andrewcrook
Copy link
Author

So , --exact hello should not open the picker but instead pick hello.out ?

yes you got it

@zeorin
Copy link

zeorin commented Aug 20, 2023

Might be useful to cache previous choices by default (with an option to ignore that history if desired). Just print to the console that previous choice was used from amongst the available options. Also ignore previous choice when choice set has new options compared to when the stored choice was made.

@eth3lbert
Copy link

eth3lbert commented Dec 7, 2023

I've also get around this by utilizing the fzf picker which provide query and auto select the only match functionality. e.g.
cargo run -- --picker fzf --picker-args --select-1 --query 311 -- pipdeptree --python /some/path/.venv/bin/python

It's simple to implement and works quite well but the downside is that not all picker have such option to auto select, and I do think provide a option to further filter (either exact or regex) would be a better approach.

@diniamo
Copy link
Contributor

diniamo commented May 14, 2024

At that point, why not just use nix run?

@iofq
Copy link

iofq commented Sep 15, 2024

maybe I am confused here but nix run doesn't help if you don't know which package/flake contains the command?

@diniamo
Copy link
Contributor

diniamo commented Sep 15, 2024

You do though, the idea is that the command is the same as the package name, so comma should just pick it instantly instead of opening the picker.

@tupakkatapa
Copy link

tupakkatapa commented Sep 16, 2024

Following this and being confused about the feature request, I can see why someone might want a feature to automatically pick the first match. Initially, I thought this meant that, and I would like to have that as an option, but exact match doesn't make any sense to me.

I mean, why just not, i.e. nix-shell -p hello instead.

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

7 participants