介绍在PowerShell Core中安装oh-my-posh和配置Cascadia字体及自定义快捷键的过程。
Windows oh-my-posh 配置
1 mins
92 words
Loading views
环境h2
- 终端: Tabby
- Shell: PowerShell Core
安装 oh-my-poshh2
iwr https://ohmyposh.dev/install.ps1 -useb | iex安装 Cascadia 字体h2
下载地址:https://www.programmingfonts.org/#cascadia-code
选择一个安装即可,本例选用 CaskaydiaCoveNerdFont-Light.ttf。
配置文件h2
编辑 PowerShell 配置文件:
code $PROFILE添加以下内容并保存:
oh-my-posh init pwsh --config C:\Users\admin\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 lsSet-Alias open iiSet-Alias type Get-CommandSet-Alias wind windsurf.cmd