jhawthorn / fzy

:mag: A simple, fast fuzzy finder for the terminal
MIT License
2.97k stars 125 forks source link

Make only part of input searchable #48

Open purpleP opened 7 years ago

purpleP commented 7 years ago

Suppose I want to fzy filter grep -rHn results. For me matches in file names are useless and just complicate things. If you would add something like fzy --filter='cut -d" " -f2, or something like that so that users could say what part of input is actually searchable this would solve this problem.

y2kbugger commented 6 years ago

Why not filter before sending input to fzy?

vim $(awk '/^> /{ print substr($0, 3) }' ~/.viminfo | fzy)

or in your case:

grep -rHn ly | cut -d" " -f2 | fzy
purpleP commented 6 years ago

@y2kbugger because that's not what I want. Suppose I'm searching something with multiple columns and I want to see both columns, but search only in the second. Think of command line history where first column is timestamp or number. There are different cases for this.

Julian commented 4 years ago

Another example of this for me is e.g. wanting to fzy ctags -- where I want to see the function signature, but filter only on the tag name.

purpleP commented 4 years ago

Another example of this for me is e.g. wanting to fzy ctags -- where I want to see the function signature, but filter only on the tag name.

Exactly!