我已经配置好了 oh-my-posh 在 powershell 上的运行,如果我从 Windows 终端中运行 powershell(这正如文档明确说明的那样),则一切都按预期工作。
然而,我倾向于从我的 WSL 终端中运行 powershell,因为我有这样一个别名:
psl='/mnt/c/Program\ Files/PowerShell/7/pwsh.exe'但是现在当我运行该别名时,我得到了以下错误:
oh-my-posh: C:\Users\username\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:19
Line |
19 | oh-my-posh init pwsh --config 'C:\Users\username\OneDrive\Documents\Powe …
| ~~~~~~~~~~
| The term 'oh-my-posh' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the
| name, or if a path was included, verify that the path is correct and try again
有什么想法吗? 谢谢
我试图改变路径,但终端好像无法识别oh-my-posh。