第一步

https://github.com/zsh-users/zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions

注意这里使用的是 oh-my-zsh。

第二步

配置 .zshrc 的 plugins:
vim ~/.zshrc
//找到下面 plugins 的配置,添加 zsh-autosuggestions
plugins=(zsh-autosuggestions) 多个空格分开
//打开一个新的 tab,基本上大功告成。

如果 tab 不起作用

可以尝试下面的解决方案:

vim ~/.oh-my-zsh/oh-my-zsh.sh
打开这个文件,找到

:${ZSH_DISABLE_COMPFIX:=true}
// 默认是 true ,改为 false
:${ZSH_DISABLE_COMPFIX:=false}
该配置项默认是 true ,改为 false。

然后执行 source ~/.zshrc ,如果出现类似:

Restart your terminal, you must seen some directories that are not secure

这样的错误,命令行执行:

sudo chmod 755 <insecure_directory_name>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2022-02-24
  • 2021-10-21
  • 2022-12-23
  • 2021-10-17
  • 2022-01-05
猜你喜欢
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
相关资源
相似解决方案