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

Add 'bind' keyword argument #36

Merged
merged 7 commits into from
May 7, 2024
Merged

Add 'bind' keyword argument #36

merged 7 commits into from
May 7, 2024

Conversation

Gregory-K
Copy link
Contributor

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:

  • Pull-Request includes a minor fix: 'Annotate 'case_sensitive' as Optional explicitly (according to the general code style/format)'. Please provide guidance on including minor fixes or not.

  • The keyword argument 'bind' was placed according to fzf's manual 'categories' under 'Interface'.

  • A 'bind' kwarg text snippet has been inserted in the README file. Uncertainty existed regarding the preferred writing style and whether it was appropriate to update the 'Changelog' section.

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.

Gregory-K added 3 commits May 6, 2024 22:43
The key/event bindings to pass to 'fzf'.
Dictionary of the form {KEY: ACTION} or {EVENT: ACTION}.
Corresponds to `--bind=KEYBINDS` fzf option.
Copy link
Owner

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an entry for this change to the changelog? The changelog is at the bottom of the README.rst.

iterfzf/__init__.py Outdated Show resolved Hide resolved
iterfzf/__init__.py Outdated Show resolved Hide resolved
iterfzf/__init__.py Outdated Show resolved Hide resolved
Copy link
Owner

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@dahlia dahlia merged commit fc4ce98 into dahlia:main May 7, 2024
4 checks passed
@Gregory-K Gregory-K deleted the dev_bind branch May 7, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants