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

bind -k nul accept-autosuggestion not binding in config.fish #7922

Closed
StratusFearMe21 opened this issue Apr 11, 2021 · 2 comments
Closed

bind -k nul accept-autosuggestion not binding in config.fish #7922

StratusFearMe21 opened this issue Apr 11, 2021 · 2 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@StratusFearMe21
Copy link

Please tell us which fish version you are using by executing the following:

fish --version: fish, version 3.2.1
echo $version: 3.2.1

Please tell us which operating system and terminal you are using. The output of uname -a and echo $TERM may be helpful in this regard although other commands might be relevant in your specific situation.

  • Linux isaac-ms7978 5.9.16-1-MANJARO #1 SMP PREEMPT Mon Dec 21 22:00:46 UTC 2020 x86_64 GNU/Linux
  • xterm-kitty

Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:

sh -c 'env HOME=$(mktemp -d) fish'

^^Did not help^^

Tell us how to reproduce the problem. Including an asciinema.org recording is useful for problems that involve the visual display of fish output such as its prompt.

  1. Put bind -k nul accept-autosuggestion in your config.fish
  2. notice that Ctrl+Space does not work
  3. run in the terminal bind -k nul accept-autosuggestion
  4. It works now

What's happening is that after updating to fish 3.2.1-1, having bind -k nul accept-autosuggestion does not actually bind Ctrl+Space to anything. I can still run this command in the console and it will bind, but it appears that having it in config.fish is not enough.

@faho
Copy link
Member

faho commented Apr 11, 2021

Ah, lovely. The default binding was missing --preset, so it's bound as a user binding.

And the bindings are only applied after config.fish (because you could set $fish_key_bindings there), so that overrides your own binding.

Path incoming.

The workaround is to put this into a function called fish_user_key_bindings:

function fish_user_key_bindings
    bind -k nul accept-autosuggestion
end

@faho faho closed this as completed in 053acf5 Apr 11, 2021
@faho faho added the bug Something that's not working as intended label Apr 11, 2021
@faho faho added this to the fish 3.3.0 milestone Apr 11, 2021
@StratusFearMe21
Copy link
Author

Thanks for such a quick response, this worked!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants