Ubuntu美化终端

Ubuntu美化终端

安装zsh

sudo apt install zsh

安装oh my zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

或者

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

如果出现443端口被拒,使用下面的指令

sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"

或者

sh -c "$(wget -O- https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"

安装zsh插件

进入oh-my-zsh的plugings文件夹

cd ~/.oh-my-zsh/custom/plugins/

安装zsh-autosuggestions

zsh-autosuggestions是一个补全插件,会根据输入的内容,关联出历史记录。按方向键右键,则会补全。

git clone https://github.com/zsh-users/zsh-autosuggestions

安装zsh-syntax-highlighting

zsh-syntax-highlighting是一个高亮插件,会高亮语法,合法的命令是绿色,不合法在的命令会报红。

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

配置环境

打开.zshrc文件,输入命令vim ~/.zshrc

找到如下代码

plugins=(git)

修改为

plugins=(
	git
  	zsh-autosuggestions
  	zsh-syntax-highlighting
)

最后运行source ~/.zshrc命令,就可以生效了

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值