问题
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.
回答1:
Yes, to bind (example) control-y to accept and then execute:
bind \cy accept-autosuggestion execute
回答2:
CTRL-f
should complete the displayed suggestion, after which tapping Return
will run it.
来源:https://stackoverflow.com/questions/58382012/fish-shell-shortcut-for-accept-and-run-command-suggestion