关于zsh:ubuntu中快速安装onmyzsh

ubuntu中疾速装置on-my-zsh

1.装置oh-my-zsh

应用命令装置zsh

sudo apt install zsh

而后装置on-my-zsh,优先举荐应用码云地址

# 码云地址
sh -c "$(wget -O- https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)" 

# github地址
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

装置过程呈现是否切换zsh,抉择y,呈现下图即装置胜利

2.装置插件

装置完结后,在用户目录下会有一个.zshrc文件,能够在这里批改主题

举荐主题ys,将ZSH_THEME批改为你想要的主题,source ~/.zshrc更新配置文件

zsh-autosuggestions

历史命令智能提醒插件。能帮忙咱们疾速执行历史命令

# 下载插件
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# 在配置文件.zshrc中减少zsh-autosuggestions,以空格隔开,再次减少插件同理
plugins=(git zsh-autosuggestions)

# 批改配置文件后都要执行改命令令其失效
source ~/.zshrc

如果呈现提醒局部也是红色的状况,能够执行以下操作

# 往.zshrch中减少上面一行内容
export TERM=xterm-256color

# 更新
source ~/.zshrc

zsh-syntax-highlighting

高亮插件,非法的命令是绿色,不非法会显示红色

# 下载插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# 在配置文件.zshrc中减少
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

# 批改配置文件后都要执行改命令令其失效
source ~/.zshrc

extract

应用 x 命令即可解压文件,再也不必记忆tar的参数

# 下载插件
git clone https://github.com/xvoland/Extract.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/Extract

# 在配置文件.zshrc中减少
plugins=(git zsh-autosuggestions zsh-syntax-highlighting extract)

# 批改配置文件后都要执行改命令令其失效
source ~/.zshrc

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理