Jump to content

给远程控制的命令行装上皮肤

给远程控制的命令行装上皮肤


Recommended Posts

Posted

这里只是记录一下自己安装的步骤以及使用到的插件。

一、安装zsh

sudo apt install zsh
使用chsh -s /bin/zsh命令将 zsh 设置为系统默认 shell。新开一个 远程控制的终端,就可以开始使用 zsh 了,这里先按q退出设置界面,因为这个设置太复杂了,下面安装oh-my-zsh进行皮肤的管理。

二、安装oh-my-zsh

sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
当问到

Do you want to change your default shell to zsh? [Y/n] 
的时候,输入y并回车

三、设置高亮插件

sudo apt-get install zsh-syntax-highlighting
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
这样输入正确的话,字体是绿色,输入错误的话是红色。

四、设置自动补全插件

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
vim ~/.zshrc
最后在plugins中添加zsh-autosuggestions并保存即可。

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
shape1
shape2
shape3
shape5
shape7
shape8
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.