diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2021-11-04 00:49:05 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-11-04 00:49:05 +0900 |
commit | 673c5d886d51fceb3df6bc96edf234837a6442a8 (patch) | |
tree | 4599dc52bc6dcb6f6937af9a90c7c7fd3ace1e31 /src | |
parent | f799b568d1a5644188b6edaeec3df5167b3e2268 (diff) |
Add 'put' action for putting the character to the prompt
fzf --bind 'space:preview(date)+put'
Close #2456
Diffstat (limited to 'src')
-rw-r--r-- | src/options.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go index e2c03dd9..b93fd972 100644 --- a/src/options.go +++ b/src/options.go @@ -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 { |