给win11 power shell安装Oh My Posh

2023-08-31  本文已影响0人  Bigglesworth

1. 下载安装Oh My Posh

winget install JanDeDobbeleer.OhMyPosh

2.下载一个nerd 字体

3. 设置Power Shell的默认字体

在nerd字体中选择一个就行
[图片上传失败...(image-369325-1693557757074)]

4. 查看profile路径

$profile

我的路径返回是:C:\Users\MyName\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

5. 把主题路径写入到powershell的配置

oh-my-posh --init --shell pwsh --config ~\AppData\Local\Programs\oh-my-posh\themes\kushal.omp.json | Invoke-Expression

[图片上传失败...(image-2e0e2b-1693557757074)]

最后重新打开powershell应该就好了,不行可以重启一下电脑

上一篇下一篇

猜你喜欢

热点阅读