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 --- go.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index 31f9b0b0..ca3ebb98 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,10 @@ require ( require ( github.com/gdamore/encoding v1.0.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/sync v0.5.0 // indirect golang.org/x/text v0.5.0 // indirect + golang.org/x/tools v0.16.1 // indirect ) go 1.17 -- cgit v1.2.3