m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Add change-prompt action

Close #2270
This commit is contained in:
Junegunn Choi
2020-12-04 20:34:41 +09:00
parent d2af3ff98d
commit 6d647e13ff
6 changed files with 65 additions and 28 deletions

View File

@@ -1823,6 +1823,15 @@ class TestGoFZF < TestBase
tmux.until { |lines| lines.item_count == 100 }
tmux.until { |lines| lines[1]&.include?('[200]') }
end
def test_change_prompt
tmux.send_keys "#{FZF} --bind 'a:change-prompt(a> ),b:change-prompt:b> ' --query foo", :Enter
tmux.until { |lines| assert_equal '> foo', lines[-1] }
tmux.send_keys 'a'
tmux.until { |lines| assert_equal 'a> foo', lines[-1] }
tmux.send_keys 'b'
tmux.until { |lines| assert_equal 'c> foo', lines[-1] }
end
end
module TestShell