comma icon indicating copy to clipboard operation
comma copied to clipboard

[feature request] disable picker by using exact match

Open andrewcrook opened this issue 2 years ago • 8 comments
trafficstars

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

andrewcrook avatar Aug 02 '23 17:08 andrewcrook

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

Artturin avatar Aug 11 '23 03:08 Artturin

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

yes you got it

andrewcrook avatar Aug 11 '23 09:08 andrewcrook

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.

zeorin avatar Aug 20 '23 16:08 zeorin

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.

eth3lbert avatar Dec 07 '23 16:12 eth3lbert

At that point, why not just use nix run?

diniamo avatar May 14 '24 17:05 diniamo