junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
61.81k stars 2.35k forks source link

Manually triggering events #3874

Closed jdujava closed 2 weeks ago

jdujava commented 2 weeks ago

Checklist

Output of fzf --version

0.53.0 (c4a9ccd6)

OS

Shell

Problem / Steps to reproduce

Is there a way to manually trigger an event?

Just wondering, I don't need it for anything specific. Having action trigger(<event>) could maybe be handy sometimes (e.g. to avoid code duplication, when the same code is to be called on a given event, or alternatively manually called via binding.

junegunn commented 2 weeks ago

No, there isn't.

A common practice to avoid code duplication is to put the code in shell variables. See https://junegunn.github.io/fzf/tips/ripgrep-integration/#4-fix-initial-list