You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've playing around using fzf as a result visualization tool rather than a filter.
I know, I know this is not what the tool is for, checked #974.
Yet the interface and preview capabilities of fzf are awesome enough so that it'd be worth for me to try to hack my way here to visualize the search results of a custom SQLite search tool based on query value inside fzf.
So I used the snippet provided in #974 and it works!
Although I had to get extra-hacky as I do NOT want fzf to filter the lines passed to it. I just want to display all of them, regardless of the current query value inside fzf.
Proposal
So my question/proposal is: Would it be possible to add an additional 'Search' option like --no-filter which basically would deactivate the search/filtering?
As I said, I do know fzf is not for this, and @junegunn has made clear simplicity of the tool is paramount.
Yet I feel this would be a really simple and straightforward option. Should be just almost just an if-check based on the option --no-filter to run the filter logic or not (although I acknowledge I'm not familiar enough with the code to know for sure :)).
And also I feel like this option would be an excellent companion for the hack that @junegunn proposed back in #974 to hackily leverage fzf as interface from a changing source :)
The hack
Just for curiosity, this is the hack I had to do for avoiding filtering results:
To make sure fzf shows all results, append the query to every line :)
sth like SOURCE_CMD "$query" | awk '{print $0 " @@@ '"$query"'"}' | filter "$query"
Drop the hacky suffix before using the chosen result: FINAL_CMD "${result% @@@*}"
The text was updated successfully, but these errors were encountered:
Context
I've playing around using fzf as a result visualization tool rather than a filter.
I know, I know this is not what the tool is for, checked #974.
Yet the interface and preview capabilities of fzf are awesome enough so that it'd be worth for me to try to hack my way here to visualize the search results of a custom SQLite search tool based on query value inside fzf.
So I used the snippet provided in #974 and it works!
Although I had to get extra-hacky as I do NOT want fzf to filter the lines passed to it. I just want to display all of them, regardless of the current query value inside fzf.
Proposal
So my question/proposal is: Would it be possible to add an additional 'Search' option like
--no-filter
which basically would deactivate the search/filtering?As I said, I do know fzf is not for this, and @junegunn has made clear simplicity of the tool is paramount.
Yet I feel this would be a really simple and straightforward option. Should be just almost just an
if
-check based on the option--no-filter
to run the filter logic or not (although I acknowledge I'm not familiar enough with the code to know for sure :)).And also I feel like this option would be an excellent companion for the hack that @junegunn proposed back in #974 to hackily leverage fzf as interface from a changing source :)
The hack
Just for curiosity, this is the hack I had to do for avoiding filtering results:
sth like
SOURCE_CMD "$query" | awk '{print $0 " @@@ '"$query"'"}' | filter "$query"
FINAL_CMD "${result% @@@*}"
The text was updated successfully, but these errors were encountered: