mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-16 15:23:48 -05:00
Add slight change to fzf as a dmenu replacement script: allow fzfmenu script ro be truly like dmenu by adding the --print-query flag and piping it to tail -1 See https://stackoverflow.com/questions/60540679/how-to-make-fzf-send-text-that-has-no-match-to-standard-output for more
@@ -1421,7 +1421,7 @@ mkfifo $output
|
||||
chmod 600 $input $output
|
||||
|
||||
# it's better to use st here (starts a lot faster than pretty much everything else)
|
||||
st -c fzfmenu -n fzfmenu -e sh -c "cat $input | fzf | tee $output" & disown
|
||||
st -c fzfmenu -n fzfmenu -e sh -c "cat $input | fzf --print-query | tail -1 | tee $output" & disown
|
||||
|
||||
# handle ctrl+c outside child terminal window
|
||||
trap "kill $! 2>/dev/null; rm -f $input $output" EXIT
|
||||
|
||||
Reference in New Issue
Block a user