From 1707b8cdba42492a88b3fc43c15c20d219c5ce2b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 25 Dec 2023 23:43:46 +0900 Subject: Add 'transform' action to conditionally perform a series of actions 'transform' action runs an external command that prints a series of actions to perform. # Disallow selecting an empty line echo -e "1. Hello\n2. Goodbye\n\n3. Exit" | fzf --reverse --header 'Select one' \ --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' # Move cursor past the empty line echo -e "1. Hello\n2. Goodbye\n\n3. Exit" | fzf --reverse --header 'Select one' \ --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' \ --bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} =~ up$ ]] && echo up || echo down' Close #3368 Close #2980 --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a55c6bdb..32164a6e 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,9 @@ bench: install: bin/fzf +generate: + PATH=$(PATH):$(GOPATH)/bin $(GO) generate ./... + build: goreleaser build --rm-dist --snapshot --skip-post-hooks @@ -181,4 +184,4 @@ update: $(GO) get -u $(GO) mod tidy -.PHONY: all build release test bench install clean docker docker-test update +.PHONY: all generate build release test bench install clean docker docker-test update -- cgit v1.2.3