iterfzf
iterfzf copied to clipboard
Implementing fzf --bind
Hi,
I love your project, and use it a lot since I'm migrating my scripts to python. However, the --bind feature of fzf hasn't yet been implemented in iterfzf.
Is there a timeline for it?
Thanks!
It would be great if we have bind
option, but it looks a quite complex feature. Typing-wise in particular. If we have such option, usage would be like below:
iterfzf(iterable, bind={
"ctrl-j": "accept",
"ctrl-k": "kill-line",
})
It can be passed as __extra__
, e.g. __extra__=['--bind=ctrl-j:accept,ctrl-k:kill-line']
Anyway, I guess everything can be passed as an extra
.
But, as the library describes itself as "Pythonic interface to fzf", writing in-line key-bindings isn't so 'pythonic'.
I've implemented a working 'bind' keyword argument adhering to the provide dictionary template:
iterfzf(iterable, bind={
"ctrl-j": "accept",
"ctrl-k": "kill-line",
})