FreeBSD12.2下安装使用zsh
1、安装相应的包
1)查找相关的包
pkg search zhs
2)安装相关的包
pkg install zsh zsh-autosuggestions zsh-syntax-highlighting
3)下载主题
这里我用Powerlevel10K
直接下载zip包,解压到/usr/local/share/zsh/themes目录(解压前,先创建该目录,当然可以放到自己喜欢的任意其他位置)。
2、设置~/.zshrc
添加如下内容
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/local/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
更换默认SHEEL
chsh -s /usr/local/bin/zsh
登录时,会启动配置文件,配置好后,会在用户目录下生成一个.p10k.zsh文件,只要在.zshrc中添加它就可以了了,要不每次登录都要重新折腾一回,如:
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/local/share/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
source ~/.p10k.zsh
3、顺便安装screenfetch、lolcat,
pkg install screenfetch lolcat
运行
screenfetch | lolcat
效果如下: