Fish shell: Shortcut for accept and run command suggestion

走远了吗. 提交于 2020-02-25 04:18:31

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!