summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-12-25 23:43:46 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-12-26 00:14:05 +0900
commit1707b8cdba42492a88b3fc43c15c20d219c5ce2b (patch)
tree268e6950fecc4bec86b38389101e52901134b3a5 /Makefile
parent41d4d70b985f665c8ecc66b83aa10209c8dfbbfd (diff)
downloadfzf-1707b8cdba42492a88b3fc43c15c20d219c5ce2b.tar.gz
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
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