man fzf)Feature request.
Mapping a key which - on pressing it - passes all the lines in fzf's buffer as a file as an argument to some program.
Example:
--bind "enter:execute(less {f}) where {f} would be a something like bash's process substitution where you can write any command using this syntax vim <(less file) and <(less file) is a new file descriptor itself. {f} could also be implemented using a temporary file.
This way one could have a convenient way to open all the lines of the current fzf buffer in another program.
My specific use case, why I am asking for this: I use fzf as a tool to filter huge log output on-the-fly to only see the things I am interested within that log. But often enough I also want to search within that filtered output, so opening everything that's displayed by fzf right now in another program like less would be very convenient. So there should be a way to open the current filtered output and to open all the lines fzf received so far regardless of the current query.
Or, even better, something like a second "mode" within fzf, to be able to search text within the filtered lines
Do you have the latest version of fzf?
0.19.0 yes
+1
I also want this feature.
My use case: I have some candidate keywords to search and explore, I want fzf to have the capability of outputing the filter results to a file (for later analysis) by pressing a key without closing the current fzf sessions. By this way, I could generate different filter outputs for diffferent search keywords in one single fzf session. And then, when I am out of idea, I would close the current fzf session and start to analyze these output files later.
Wish: I learn that fzf supports the variable {} to represent the currently selected line. I wish that fzf would have another variable (e.g. []) to represent for the whole current filter outputs.
# Press CTRL-Y to copy the line to clipboard and aborts fzf (requires pbcopy)
fzf --bind 'f1:execute(less -f {}),ctrl-y:execute-silent(echo {} | pbcopy)+abort'
is there any reason your not using {+} to represent all toggled items?
--bind='ctrl-v:toggle-all+execute:less -f {+}'
--bind='ctrl-n:toggle-all+execute:tee -a ~/tempresults <{+}' #will output contents of all selected files to tempresults
--bind='ctrl-p:toggle-all+execute:echo {+} >> ~/tempresults' #will output the names of selected files to tempresults
Theres also the 鈥攕ync flag for multi stage searches
Many thanks @rayiik for the pointers, very details! 馃憤
I was not aware of many support placeholders by the new version of fzf.
I have enough constructs for my custom workflow now.
Cool enjoy :)
Thanks. Also check out {+f} which was added in 0.19.0.
https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0190
Most helpful comment
Thanks. Also check out
{+f}which was added in 0.19.0.https://github.com/junegunn/fzf/blob/master/CHANGELOG.md#0190