美化terminal時碰到的問題- Set-Theme


報錯:

1  Set-Theme Set-Theme: The term 'Set-Theme' 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.

 卡在了無法設置主題這里

突破點是找到一個帖子中:https://blog.csdn.net/qq_35067322/article/details/107031921里說可以列出樣式。

 

 

 

C:\Users\Qiu\Desktop> Get-Theme

Hi there!

It seems you're using an oh-my-posh V2 cmdlet while running V3.
To migrate your current setup to V3, have a look the documentation.

https://ohmyposh.dev/docs/upgrading

C:\Users\Qiu\Desktop> Update-Module -Name oh-my-posh -AllowPrerelease -Scope CurrentUser
C:\Users\Qiu\Desktop> Set-Theme Agnoster
Set-Theme: The term 'Set-Theme' 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.

然后就看到上面這段,大概意思是版本不兼容(為什么沒看到別人出現該情況嗚嗚嗚/(ㄒoㄒ)/~~)

打開網站: https://ohmyposh.dev/docs/upgrading

更新下自己的oh-my-posh:Update-Module -Name oh-my-posh -AllowPrerelease -Scope CurrentUser

發現使用set-theme也是不行,

官方是使用 Get-PoshThemes 查看支持主題;Set-PoshPrompt paradox 設置主題。

 

 

 

 

over~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM