diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-12-25 23:43:46 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-12-26 00:14:05 +0900 |
commit | 1707b8cdba42492a88b3fc43c15c20d219c5ce2b (patch) | |
tree | 268e6950fecc4bec86b38389101e52901134b3a5 /go.mod | |
parent | 41d4d70b985f665c8ecc66b83aa10209c8dfbbfd (diff) |
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 'go.mod')
-rw-r--r-- | go.mod | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |