Windows 终端 - 通过 oh-my-posh/posh-git Set-Theme 错误自定义 PowerShell?

Nih*_*fiq 7 git powershell windows-terminal

Windows 终端 - 通过 oh-my-posh/posh-git Set-Theme 错误自定义 PowerShell?

我按照微软链接的确切教程:在此处输入链接描述,视频链接:在此处输入链接描述

我已经安装了 Posh-Git 和 Oh-My-Posh:通过这个代码 -

安装模块 posh-git -Scope CurrentUser

安装模块 oh-my-posh -Scope CurrentUser

我已经安装了 PSReadLine: 通过这个代码 -

安装模块 -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck

我还通过在我的 PowerShell 配置文件中键入代码 $PROFILE并复制/粘贴此代码来创建 Microsoft.PowerShell_profile.ps1 文件:

Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
Run Code Online (Sandbox Code Playgroud)

但我收到此错误: 在此处输入图片说明

Coo*_*ots 26

Set-Theme是一个oh-my-posh V2 cmdlet;您可能正在运行 V3。如果您正确地遵循了其余的设置,您可以简单地替换Set-Theme ParadoxSet-PoshPrompt -Theme Paradox.

更多信息在这里:https : //ohmyposh.dev/docs/upgrading