Open andrewcrook opened 1 year ago
So , --exact hello
should not open the picker but instead pick hello.out
?
So
, --exact hello
should not open the picker but instead pickhello.out
?
yes you got it
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.
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.
At that point, why not just use nix run
?
maybe I am confused here but nix run
doesn't help if you don't know which package/flake contains the command?
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.
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.
Would be good to have an option to disable the picker to use an exact match instead