mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-13 13:53:47 -05:00
Add 'put' action for putting the character to the prompt
fzf --bind 'space:preview(date)+put' Close #2456
This commit is contained in:
@@ -981,6 +981,12 @@ func parseKeymap(keymap map[tui.Event][]action, str string) {
|
||||
appendAction(actEnableSearch)
|
||||
case "disable-search":
|
||||
appendAction(actDisableSearch)
|
||||
case "put":
|
||||
if key.Type == tui.Rune && unicode.IsGraphic(key.Char) {
|
||||
appendAction(actRune)
|
||||
} else {
|
||||
errorExit("unable to put non-printable character: " + pair[0])
|
||||
}
|
||||
default:
|
||||
t := isExecuteAction(specLower)
|
||||
if t == actIgnore {
|
||||
|
||||
Reference in New Issue
Block a user