Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
2.98k stars 90 forks source link

[FR] Allow to disable default bindings #400

Closed doronbehar closed 4 months ago

doronbehar commented 6 months ago

Is your feature request related to a problem? Please describe.

I'd like to use tab for triggering the completion, and while in fzf, to select multiple arguments with it, until I press Enter.

Describe the solution you'd like I noticed this line:

https://github.com/Aloxaf/fzf-tab/blob/69024c27738138d6767ea7246841fdfc6ce0d0eb/lib/-ftb-fzf#L31

Which is unconditional. I'd like to disable the bindings for tab, btab and ctrl-space.

Describe alternatives you've considered

The only solution I found was simply editing the source code, which is not ideal of course.

Additional context

In addition to manually disabling most of the default bindings, I also noticed I had to add this as well:

zstyle ':fzf-tab:*' fzf-flags --expect=enter

I wonder why the default --expect doesn't include the enter key:

https://github.com/Aloxaf/fzf-tab/blob/69024c27738138d6767ea7246841fdfc6ce0d0eb/lib/-ftb-fzf#L90

The accept-line behavior is not desirable in my case.

doronbehar commented 6 months ago

Now I see that I also talked about this in https://github.com/Aloxaf/fzf-tab/issues/362 .

Aloxaf commented 4 months ago

You can override default setting like zstyle ':fzf-tab:*' fzf-flags --bind "tab:toggle,btab:ignore,ctrl-space:ignore"


I wonder why the default --expect doesn't include the enter key:

enter is already bound to accept in fzf's default settings.

--expect=KEY[,..] Comma-separated list of keys that can be used to complete fzf in addition to the default enter key...