dahlia / iterfzf

Pythonic interface to fzf, a CLI fuzzy finder
https://pypi.python.org/pypi/iterfzf
GNU General Public License v3.0
164 stars 19 forks source link

Add 'bind' keyword argument #36

Closed Gregory-K closed 5 months ago

Gregory-K commented 5 months ago

The key/event bindings to pass to 'fzf'.
Dictionary of the form {KEY: ACTION} or {EVENT: ACTION}.
Corresponds to --bind=KEYBINDS option.

example:

keybinds = {
    "ctrl-j": "accept",
    "ctrl-k": "kill-line",
}

iterfzf(iterable, bind=keybinds)

Related Issue #21

Notes:

Sub-Notes:

It is inferred by code comments that the fzf manual 'categories' are the desired grouping/sorting of the kwargs. If the hypothesis is true, iterfzf() keyword arguments and their listing in README should be rearranged and match.