Windows Terminal 设置

首先升级到最新版本的 Windows Terminal。

将Power Line字体拷贝进fonts,再安装 oh-my-posh,下载链接如下:

https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v27.6.0

安装 posh-git:

# 确保使用 TLS 1.2(国内常需)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# 安装到当前用户(自动选对路径)
Install-Module posh-git -Scope CurrentUser -Force -AllowClobber
# 如果文件不存在,就创建它
if (!(Test-Path -Path $PROFILE)) {
    New-Item -ItemType File -Path $PROFILE -Force
}
notepad $PROFILE

在文件里存入以下内容:

# 启用彩色终端支持
$env:TERM = "xterm-256color"

# 加载 posh-git
Import-Module posh-git

# 初始化 oh-my-posh(使用 jandedobbeleer 主题)
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
. $PROFILE

安装完成:
image

posted @ 2025-11-22 12:28  飞花阁  阅读(43)  评论(0)    收藏  举报
//雪花飘落效果