From 4efcc344c35e8bb7e6ba7bb23e5885051420b361 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 23 Jul 2025 19:39:01 +0900 Subject: Add 'trigger(KEY_OR_EVENT[,...])' action --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e2a872..1a362f7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,22 @@ CHANGELOG echo "execute-silent(echo -n \{} | pbcopy)+bell" ' ``` +- Added `trigger(...)` action that triggers events bound to another key or event. + ```sh + # You can click on each key name to trigger the actions bound to that key + fzf --footer 'Ctrl-E: Edit / Ctrl-V: View / Ctrl-Y: Copy to clipboard' \ + --with-shell 'bash -c' \ + --bind 'ctrl-e:execute:vim {}' \ + --bind 'ctrl-v:execute:view {}' \ + --bind 'ctrl-y:execute-silent(echo -n {} | pbcopy)+bell' \ + --bind 'click-footer:transform: + [[ $FZF_CLICK_FOOTER_WORD =~ Ctrl ]] && echo "trigger(${FZF_CLICK_FOOTER_WORD%:})" + ' + ``` + - You can specify a series of keys and events + ```sh + fzf --bind 'a:up,b:trigger(a,a,a)' + ``` - Added support for `{*n}` and `{*nf}` placeholder. - `{*n}` evaluates to the zero-based ordinal index of all matched items. - `{*nf}` evaluates to the temporary file containing that. -- cgit v1.2.3