Fish-style Autosuggestion in Zsh?

前端 未结 2 1517
半阙折子戏
半阙折子戏 2021-02-03 22:28

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

2条回答
  •  一个人的身影
    2021-02-03 23:19

    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
    

提交回复
热议问题