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

This commit is contained in:
Junegunn Choi committed 2025-07-23 19:41:06 +09:00
1 parent 5818b58350
commit 4efcc344c3
7 files changed
+145 -88

No files matched your search

+10
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