CentOS安装Oh my zsh
Oh My Zsh 是一款社区驱动的命令行工具,是一种生活方式。 它基于zsh命令行,提供了主题配置,插件机制,已经内置的便捷操作。是一个令人愉快的、开源的、社区驱动的框架,用于管理您的 Zsh 配置。它捆绑了数千个有用的功能、助手、插件、主题和一些让你大呼…
Oh My Zsh 官网:ohmyz.sh
未安装 Oh My Zsh:
安装 Oh My Zsh 后:
...
安装oh-my-zsh
需先提前安装 git,这里就不在介绍 git 安装与基本使用,可以看上一篇《开源分布式版本控制系统 git:基础篇章》文章。
cd /Software/
# 1、安装 Oh-My-Zsh
wget https://gitee.com/ThinkCsly/install-oh-my-zsh/raw/master/centos-install-oh-my-zsh.sh
# 给执行权限
chmod +x centos-install-oh-my-zsh.sh
# 运行脚本
./centos-install-oh-my-zsh.sh
安装成功:
# 修改主题
vim ~/.zshrc
ZSH_THEME="cloud" # 自定义即可
# 重新加载配置:
source ~/.zshrc
# 2、安装智能高亮
git clone https://gitee.com/ThinkCsly/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 配置高亮:
vim ~/.zshrc
plugins=(git zsh-syntax-highlighting)
# 重新加载配置:
source ~/.zshrc
# 3、安装自动补全
git clone https://gitee.com/ThinkCsly/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# 配置自动提示
vim ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
# 重新加载配置:
source ~/.zshrc
高亮:
自动提示:
输入过的命令,从第二次开始就会自动提示,按方向右键即可。
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: