1. 安裝 Oh My Posh

兩種則一,關於 choco / scoop / winget 可以看這篇

不過本篇是使用 scoop 去安裝的,所以以下教學都是 scoop 可用。

  1. scoop
scoop install <https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json>
  1. winget
winget install JanDeDobbeleer.OhMyPosh -s winget

2. 編輯 PowerShell 啟動檔案

  1. 使用編輯器打開路徑,若沒有安裝 vscode 且正確設定使用 code 編輯,可以輸入 $profile 顯示檔案位置。
code $profile

輸入以下內容

oh-my-posh init pwsh | Invoke-Expression

儲存後重新打開 Terminal 就可以看到效果了

3. 挑選主體

Get-PoshThemes

如果遇到以下問題代表第二點沒有設置正確