Logo
1 mins
Windows oh-my-posh 配置

Windows oh-my-posh 配置

Windows oh-my-posh 配置

环境h2

tabby + powershell core

Tabby: https://tabby.sh/
Pwsh: https://github.com/PowerShell/PowerShell

oh-my-posh 安装h2

官方文档 https://ohmyposh.dev/docs/installation/windows

iwr https://ohmyposh.dev/install.ps1 -useb | iex

Cascadia字体h2

下载安装

https://www.programmingfonts.org/#cascadia-code

装一个就行我这里选的是CaskaydiaCoveNerdFont-Light.ttf

配置文件h2

Terminal window
code $PROFILE
oh-my-posh init pwsh --config C:\Users\user\App\poweshell.omp.json | Invoke-Expression
Set-PSReadLineKeyHandler -Key Ctrl+d -ScriptBlock {
[Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
[Microsoft.PowerShell.PSConsoleReadLine]::Insert('exit')
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
}
Set-Alias ll ls
Set-Alias open ii
Set-Alias type Get-Command
Set-Alias wind windsurf.cmd

:)