Skip to content
Myr

Allow action composition over multiple --bind

Before adoption: this commit came in with the history the project adopted, so no landing records it.

# Note + prefix in the second bind expression fzf --bind u:up --bind u:+up fzf --bind u:up+up

authored by Junegunn Choi · committed by Junegunn Choi · parent 60465c4 · Browse files · 2 files+7 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−2 removed

  • other:+7 added−2 removed

2 files+7 added−2 removed

modified:src/options_test.go+2 added-1 removed
244 unmodified lines
245 "ctrl-a:kill-line,ctrl-b:toggle-sort+up+down,c:page-up,alt-z:page-down,"+246 "f1:execute(ls {+})+abort+execute(echo {+})+select-all,f2:execute/echo {}, {}, {}/,f3:execute[echo '({})'],f4:execute;less {};,"+247 "alt-a:execute-Multi@echo (,),[,],/,:,;,%,{}@,alt-b:execute;echo (,),[,],/,:,@,%,{};,"+248 "x:Execute(foo+bar),X:execute/bar+baz/"+249 ",f1:+top,f1:+top"+250 ",,:abort,::accept,+:execute:++\nfoobar,Y:execute(baz)+up")251 check(tui.CtrlA, "", actKillLine)252 check(tui.CtrlB, "", actToggleSort, actUp, actDown)253 check(tui.AltZ+'c', "", actPageUp)254 check(tui.AltZ+',', "", actAbort)255 check(tui.AltZ+':', "", actAccept)256 check(tui.AltZ, "", actPageDown)256 check(tui.F1, "ls {+}", actExecute, actAbort, actExecute)257 check(tui.F1, "ls {+}", actExecute, actAbort, actExecute, actSelectAll, actTop, actTop)258 check(tui.F2, "echo {}, {}, {}", actExecute)259 check(tui.F3, "echo '({})'", actExecute)260 check(tui.F4, "less {}", actExecute)261 check(tui.AltZ+'x', "foo+bar", actExecute)
163 unmodified lines
modified:src/options.go+5 added-1 removed
807 unmodified lines
808 appendAction(actPreviewPageDown)809 default:810 t := isExecuteAction(specLower)811 if t == actIgnore {812 if specIndex == 0 && specLower == "" {813 actions = append(keymap[key], actions...)814 } else {812 errorExit("unknown action: " + spec)815 errorExit("unknown action: " + spec)816 }817 } else {818 var offset int819 switch t {820 case actReload:
562 unmodified lines