logo 🤗

技术视野

聚焦科技前沿,分享技术解析,洞见未来趋势。在这里,与您一起探索人工智能的无限可能,共赴技术盛宴。

  1. 安装zsh
sudo apt install zsh
  1. 设置默认终端
sudo chsh -s /bin/zsh ubuntu
  1. 安装oh-my-zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

语法高亮插件

  1. 安装
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1.  配置(可以忽略,后面直接替换生效)
    在~/.zshrc的plugins中加入`zsh-syntax-highlighting

自动补全插件

  1. 防止报错The unauthenticated git protocol on port 9418 is no longer supported.,则解决如下:
git config --global url."https://".insteadOf git://
  1. 安装
git clone git://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. 替换主题并且使插件生效
sed -i "s/robbyrussell/ys/g" ~/.zshrc
sed -i "s/(git)/(git zsh-syntax-highlighting zsh-autosuggestions)/g" ~/.zshrc
source ~/.zshrc
  1.  配置(可以忽略,上面的sed直接替换生效)
    在~/.zshrc的plugins 中加入zsh-autosuggestions

版权属于:tlntin
作品采用:本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
更新于: 2023年05月26日 14:31


39 文章数
5 分类数
40 页面数
已在风雨中度过 1年160天12小时17分
目录
来自 《Linux配置Zsh》
暗黑模式
暗黑模式
返回顶部
暗黑模式
暗黑模式
返回顶部