Skip to content
Discussion options

You must be logged in to vote

Is there a way to do this with fzf?

Try accept-or-print-query action

MANWIDTH=120 fzf --man | col -b | grep -C2 accept-or-print-query
          #  accept                       enter   double-click
          #  accept-non-empty             (same as accept except that it prevents fzf from exiting without selection)
          #  accept-or-print-query        (same as accept except that it prints the query when there's no match)
          #  backward-char                ctrl-b  left
          #  backward-delete-char         ctrl-h ctrl-bspace bspace
seq 5 | fzf --query 'FOOBAR' --bind 'result:accept'

seq 5 | fzf --query 'FOOBAR' --bind 'result:accept-or-print-query'
# FOOBAR

Alternative: t…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@fsc0
Comment options

@PowerUser64
Comment options

@fsc0
Comment options

@PowerUser64
Comment options

@LangLangBart
Comment options

Answer selected by PowerUser64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants