Fish shell: Shortcut for accept and run command suggestion

Viewed 862

is it possible to create a shortcut such as "Shift+Return" to accept and run the displayed suggestion?

The default key-bindings require pressing the arrow keys, which involve a movement away from the keys.

2 Answers

CTRL-f should complete the displayed suggestion, after which tapping Return will run it.

Yes, to bind (example) control-y to accept and then execute:

bind \cy accept-autosuggestion execute
Related