记录一下怎么配置的
server端配置
在server上安装zsh(需要reboot)和oh-my–zsh,然后在./zshrc
中设置ZSH_THEME="agnoster"
# 安装zsh-syntax-highlighting语法高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
source ~/.zshrc
client端配置
拉取字体git clone https://github.com/powerline/fonts.git --depth=1,如果是unix直接执行install.sh即可,如果是windows terminal(以下简称WT):
- 管理员身份运行WT
- 执行
set-executionpolicy remotesigned
开启运行脚本权限 - 执行
install.ps1
,将powerline字体安装到系统 - 打开 用户设置-字体,从*****for powerline名称的字体挑个,复制不了名称可以在README里面找
ctrl + ,
在WT中打开设置- 修改
json
文件,添加fontFace
和fontSize
{
.....
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
},
"list":
[
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"startingDirectory": ".",
"hidden": false,
"fontFace": "Roboto Mono for Powerline",
"fontSize": 11
},
......
]
},
.......
}
效果和ubuntu终端下的效果还是有差距的,少了很多色彩