Fish-style Autosuggestion in Zsh?

前端 未结 2 1465
半阙折子戏
半阙折子戏 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
    
    0 讨论(0)
  • 2021-02-03 23:27

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

    0 讨论(0)
提交回复
热议问题