mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-29 16:23:57 +00:00
1707b8cdba
'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
24 lines
592 B
Modula-2
24 lines
592 B
Modula-2
module github.com/junegunn/fzf
|
|
|
|
require (
|
|
github.com/gdamore/tcell/v2 v2.5.4
|
|
github.com/mattn/go-isatty v0.0.17
|
|
github.com/mattn/go-runewidth v0.0.14
|
|
github.com/mattn/go-shellwords v1.0.12
|
|
github.com/rivo/uniseg v0.4.4
|
|
github.com/saracen/walker v0.1.3
|
|
golang.org/x/sys v0.15.0
|
|
golang.org/x/term v0.15.0
|
|
)
|
|
|
|
require (
|
|
github.com/gdamore/encoding v1.0.0 // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.2.0 // 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
|