[ohmyposh官网]ohmyposh.dev/
安装oh-my-posh
参照官网安装命令:
winget install JanDeDobbeleer.OhMyPosh -s winget
安装官网推荐字体
有很多字体可选,只要是为了支持图标。
oh-my-posh font install meslo
Git Bash配置oh-my-posh
将主题.omp.json文件的路径复制出来,或者将使用到的主题文件拷贝到意愿位置;
eval "$(oh-my-posh init bash --config /c/Users/jay18/AppData/Local/Programs/oh-my-posh/themes/M365Princess.omp.json)"
再在 ~/.profile 文件(没有则touch .profile创建)添加命令,后执行 . ~/.profile 刷新,重启终端即可生效。
(~/.bashrc (could be ~/.profile or ~/.bash_profile))