Fish-style Autosuggestion in Zsh?

送分小仙女□ 提交于 2019-12-03 09:11:38

问题


Is there a way to do the type of auto-suggestion Fish does in Zsh?


回答1:


https://github.com/tarruda/zsh-autosuggestions does exactly what I wanted. If you want fish-style autopredictions in zsh, use that.




回答2:


Zsh has predict, run the commands below this and then hit Ctrl-X 1 or just type predict-on to give it a try

#-*-shell-script-*-
autoload predict-on
autoload predict-off

# you may also wish to bind it to some keys...
zle -N predict-on
zle -N predict-off
bindkey '^X1' predict-on
bindkey '^X2' predict-off


来源:https://stackoverflow.com/questions/17223388/fish-style-autosuggestion-in-zsh

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