Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing fzf --bind #21

Open
jayghoshter opened this issue Dec 12, 2020 · 3 comments
Open

Implementing fzf --bind #21

jayghoshter opened this issue Dec 12, 2020 · 3 comments

Comments

@jayghoshter
Copy link

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!

@dahlia
Copy link
Owner

dahlia commented Nov 14, 2023

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",
})

@Gregory-K
Copy link
Contributor

It can be passed as __extra__, e.g. __extra__=['--bind=ctrl-j:accept,ctrl-k:kill-line']

@Gregory-K
Copy link
Contributor

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",
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants