Skip to content

Don't add the currently hovered option on accept #4358

Answered by fsc0
LukasKnuth asked this question in Q&A
Discussion options

You must be logged in to vote
#!/usr/bin/env bash
seq 5 | fzf \
	--multi \
	--bind 'enter:transform:
		if (( FZF_SELECT_COUNT > 0 )); then
			echo -n "accept"
		else
			echo -n "ignore"
		fi'

You didn't mention what enter key do when there's no selection,
so I used action ignore on the above example script.
Change the action ignore whatever you want.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@junegunn
Comment options

Answer selected by junegunn
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