fzy icon indicating copy to clipboard operation
fzy copied to clipboard

Make only part of input searchable

Open purpleP opened this issue 8 years ago • 4 comments

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.

purpleP avatar Jul 24 '17 20:07 purpleP

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

y2kbugger avatar Dec 05 '17 17:12 y2kbugger

@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.

purpleP avatar Dec 05 '17 17:12 purpleP

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.

Julian avatar Dec 30 '19 12:12 Julian

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!

purpleP avatar Dec 31 '19 13:12 purpleP