OhMyPosh来美化GitBash
# 2.4追加到~/.bash_profile(windows下)其中json文件是不同主题,参考官网(# 2. 下载oh-my-posh(然后重启终端,这就是最终效果了。## 2.2配置环境变量。# 1.下载git(## 2.3下载字体。文件路径需要参考下图。
·
1.下载git(Git)
2. 下载oh-my-posh(Windows | Oh My Posh)
2.1安装
winget install JanDeDobbeleer.OhMyPosh -s winget
2.2配置环境变量
$env:Path += ";C:\Users\user\AppData\Local\Programs\oh-my-posh\bin"
2.3下载字体
oh-my-posh font install
确保将您的终端配置为使用您已安装的字体
2.4追加到~/.bash_profile(windows下)
添加以下内容~/.bashrc
(可能是~/.profile
或~/.bash_profile
取决于您的环境)
文件路径需要参考下图
其中json文件是不同主题,参考官网(Themes | Oh My Posh)
eval "$(oh-my-posh --init --shell bash --config ~/montys.omp.json)"
比如这里我的就是
eval "$(oh-my-posh --init --shell bash --config ~/AppData/Local/Programs/oh-my-posh/themes/1_shell.omp.json)"
添加后,重新加载您的个人资料以使更改生效。
exec bash
source ~/.bash_profile
更多推荐
已为社区贡献1条内容
所有评论(0)