junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
62.32k stars 2.35k forks source link

Multiple delimiter to work with -n and --select-1? #3762

Closed tmpm697 closed 2 months ago

tmpm697 commented 2 months ago

Checklist

Output of fzf --version

0.50.0

OS

Shell

Problem / Steps to reproduce

I have this pattern:

echo "    3   certificatesigningrequests (aka 'csr')"

I want to immediately select (--select-1) base on either match certificatesigningrequests or csr

I can immediately match certificatesigningrequests with -n 2.. --select-1 but I then also need to match csr which has delimiter '

how can i specify multiple patterns to match here for --select-1 to immediately select if matched?

i.e:

cmd <smth> certificatesigningrequ<trigger_fzf_here> --> match certificatesigningrequests which needs default space delimiter

cmd <smth> csr<trigger_fzf_here> --> match csr which needs' delimiter

proposal: we can merge both delimiter and -n filed to select like: this option can be specified multiple times.

--whatevername_to_merge_delimiter_and_nth "2:\'" --> this match on filed 2th and delimiter is `'`