junegunn/fzf

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

Closed this issue · 0 comments

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.50.0

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

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 `'`