shellfish

Fish shell: Shortcut for accept and run command suggestion


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.


Solution

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

    bind \cy accept-autosuggestion execute