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

Add 'trigger(KEY_OR_EVENT[,...])' action

This commit is contained in:
Junegunn Choi
2025-07-23 19:39:01 +09:00
parent 5818b58350
commit 4efcc344c3
7 changed files with 145 additions and 88 deletions

View File

@@ -2035,4 +2035,14 @@ class TestCore < TestInteractive
assert_equal 19, it.select_count
end
end
def test_trigger
tmux.send_keys %(seq 100 | #{FZF} --bind 'a:up+trigger(a),b:trigger(a,a,b,a)'), :Enter
tmux.until { assert_equal 100, it.match_count }
tmux.until { |lines| assert_includes lines, '> 1' }
tmux.send_keys :a
tmux.until { |lines| assert_includes lines, '> 3' }
tmux.send_keys :b
tmux.until { |lines| assert_includes lines, '> 9' }
end
end