Skip to content
Myr

[bash] Fix --query argument of CTRL-R

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

Fix #1898

authored by Junegunn Choi · committed by Junegunn Choi · parent e34c7c0 · Browse files · 2 files+10 added−7 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+10 added−7 removed

  • tests:+9 added−6 removed
  • other:+1 added−1 removed

2 files+10 added−7 removed

modified:shell/key-bindings.bash+1 added-1 removed
modified:test/test_go.rb+9 added-6 removed
1851 unmodified lines
1852 end18531854 def test_ctrl_r_abort1855 skip "doesn't restore the original line when search is aborted pre Bash 4" if shell == :bash && /(?<= version )\d+/.match(`#{Shell.bash} --version`).to_s.to_i < 41856 tmux.send_keys 'foo'1857 tmux.until { |lines| lines[-1].start_with? 'foo' }1858 tmux.send_keys 'C-r'1859 tmux.until { |lines| lines[-1].start_with? '>' }1860 tmux.send_keys 'C-g'1861 tmux.until { |lines| lines[-1].start_with? 'foo' }1856 %w[foo ' "].each do |query|1857 tmux.prepare1858 tmux.send_keys(query)1859 tmux.until { |lines| lines[-1].start_with? query }1860 tmux.send_keys 'C-r'1861 tmux.until { |lines| lines[-1] == "> #{query}" }1862 tmux.send_keys 'C-g'1863 tmux.until { |lines| lines[-1].start_with? query }1864 end1865 end18661867 def retries(times = 3)1868 (times - 1).times do
266 unmodified lines