Skip to content
Myr

[bash] Put C-t items at point in vi mode (#1876)

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

Be consistent with emacs mode and put the items at the point vs. the end of the command line.

authored by Jack Bates · committed by GitHub · parent 9897ee9 · Browse files · 3 files+31 added−52 removed
This commit

State

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

Diff stats

3 files+31 added−52 removed

  • tests:+4 added−4 removed
  • other:+27 added−48 removed

3 files+31 added−52 removed

modified:shell/key-bindings.bash+9 added-25 removed
modified:test/test_go.rb+4 added-4 removed
113 unmodified lines
114 end115 end116117 def paste(str)118 `tmux setb '#{str.gsub("'", "'\\''")}' \\; pasteb -t #{win} \\; send-keys -t #{win} Enter`118 system('tmux', 'setb', str, ';', 'pasteb', '-t', win, ';', 'send-keys', '-t', win, 'Enter')119 end120121 def capture(pane = 0)122 File.unlink TEMPNAME while File.exist? TEMPNAME
367 unmodified lines
490 end491 end492493 def test_query_unicode494 tmux.paste "(echo abc; echo 가나다) | #{fzf :query, '가다'}"494 tmux.paste "(echo abc; echo $'\\352\\260\\200\\353\\202\\230\\353\\213\\244') | #{fzf :query, "$'\\352\\260\\200\\353\\213\\244'"}"495 tmux.until { |lines| lines[-2].include? '1/2' }496 tmux.send_keys :Enter497 assert_equal ['가나다'], readonce.split($INPUT_RECORD_SEPARATOR)498 end
1274 unmodified lines
1773 tmux.send_keys :Tab1774 tmux.until { |lines| lines.select_count == 2 }17751776 tmux.send_keys :Enter1777 tmux.until { |lines| lines.any_include?(/echo.*fzf-unicode.*1.*fzf-unicode.*2/) }1777 tmux.until { |lines| lines.join.match(/echo.*fzf-unicode.*1.*fzf-unicode.*2/) }1778 tmux.send_keys :Enter1779 tmux.until { |lines| lines.any_include?(/^fzf-unicode.*1.*fzf-unicode.*2/) }1780 end1781
208 unmodified lines
1990 end19911992 def test_file_completion_unicode1993 FileUtils.mkdir_p '/tmp/fzf-test'1994 tmux.paste 'cd /tmp/fzf-test; echo -n test3 > "fzf-unicode 테스트1"; echo -n test4 > "fzf-unicode 테스트2"'1994 tmux.paste "cd /tmp/fzf-test; echo -n test3 > $'fzf-unicode \\355\\205\\214\\354\\212\\244\\355\\212\\2701'; echo -n test4 > $'fzf-unicode \\355\\205\\214\\354\\212\\244\\355\\212\\2702'"1995 tmux.prepare1996 tmux.send_keys 'cat fzf-unicode**', :Tab1997 tmux.until { |lines| lines.match_count == 2 }1998
88 unmodified lines
modified:.travis.yml+18 added-23 removed