github.com/xyproto/u-root@v6.0.1-0.20200302025726-5528e0c77a3c+incompatible/cmds/core/elvish/eval/bundled/readline-binding.elv.go (about) 1 package bundled 2 3 const readlineBindingElv = ` 4 b=[k f]{ edit:insert:binding[$k] = $f } { 5 $b Ctrl-A $edit:move-dot-sol~ 6 $b Ctrl-B $edit:move-dot-left~ 7 $b Ctrl-D { 8 if (> (count $edit:current-command) 0) { 9 edit:kill-rune-right 10 } else { 11 edit:return-eof 12 } 13 } 14 $b Ctrl-E $edit:move-dot-eol~ 15 $b Ctrl-F $edit:move-dot-right~ 16 $b Ctrl-H $edit:kill-rune-left~ 17 $b Ctrl-L { clear > /dev/tty } 18 $b Ctrl-N $edit:end-of-history~ 19 # TODO: ^O 20 $b Ctrl-P $edit:history:start~ 21 # TODO: ^S ^T ^X family ^Y ^_ 22 $b Alt-b $edit:move-dot-left-word~ 23 # TODO Alt-c Alt-d 24 $b Alt-f $edit:move-dot-right-word~ 25 # TODO Alt-l Alt-r Alt-u 26 27 # Ctrl-N and Ctrl-L occupied by readline binding, $b to Alt- instead. 28 $b Alt-n $edit:navigation:start~ 29 $b Alt-l $edit:location:start~ 30 } 31 32 b=[k f]{ edit:completion:binding[$k] = $f } { 33 $b Ctrl-B $edit:completion:left~ 34 $b Ctrl-F $edit:completion:right~ 35 $b Ctrl-N $edit:completion:down~ 36 $b Ctrl-P $edit:completion:up~ 37 $b Alt-f $edit:completion:trigger-filter~ 38 } 39 40 b=[k f]{ edit:navigation:binding[$k] = $f } { 41 $b Ctrl-B $edit:navigation:left~ 42 $b Ctrl-F $edit:navigation:right~ 43 $b Ctrl-N $edit:navigation:down~ 44 $b Ctrl-P $edit:navigation:up~ 45 $b Alt-f $edit:navigation:trigger-filter~ 46 } 47 48 b=[k f]{ edit:history:binding[$k] = $f } { 49 $b Ctrl-N $edit:history:down-or-quit~ 50 $b Ctrl-P $edit:history:up~ 51 $b Ctrl-G $edit:insert:start~ 52 } 53 54 b=[k f]{ edit:listing:binding[$k] = $f } { 55 $b Ctrl-N $edit:listing:down~ 56 $b Ctrl-P $edit:listing:up~ 57 $b Ctrl-V $edit:listing:page-down~ 58 $b Alt-v $edit:listing:page-up~ 59 $b Ctrl-G $edit:insert:start~ 60 } 61 62 b=[k f]{ edit:histlist:binding[$k] = $f } { 63 $b Alt-g $edit:histlist:toggle-case-sensitivity~ 64 $b Alt-d $edit:histlist:toggle-dedup~ 65 } 66 `