Live Filtering with find & exec plus grep #1741
-
Hi, i am trying to run the following as a live picker, was wondering even if there might be a way to optimize it in a way that the live part that is re-run is not the entire command i.e find in this case, when the query changes, but if the result of the find can be piped into ug and then reused for the duration of the live picking / greping, since the list of files does not need to be dynamic. Even better yet, a two stage picker would be the best option require'fzf-lua'.fzf_live(string.format('find \'%s\' -name \'*-sources.jar\' -exec ug -z \'<query>\' \'{}\' \\;', dir)) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This would have to be done at the the command level, redirect the find conditionally into a temp file, and then use cat, something like |
Beta Was this translation helpful? Give feedback.
This would have to be done at the the command level, redirect the find conditionally into a temp file, and then use cat, something like
[ ! -f tmpfile ] && find … > tmpfile; cat tmpfile | ug …