首先需要安装字体
https://github.com/microsoft/cascadia-code/releases
将这六个文件安装
接下来更改terminal配置文件
"profiles":
{
"defaults": {},
"list":
[
{
"colorScheme": "One Half Dark",
"commandline": "powershell.exe -NoLogo -NoExit",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell",
"acrylicOpacity": 1,
"useAcrylic": true,
//这里是字体
"fontFace": "Cascadia Code PL",
//这里是背景图片
"backgroundImage": "C:\\Users\\86138\\Music\\hexo\\themes\\ayer\\source\\images\\5.jpg",
"backgroundImageOpacity": 0.2,
"backgroundImageStretchMode": "fill"
},
{
"commandline": "cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
之后安装一些东西
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
把下面内容输入终端
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $profile
//将下面内容写入
Import-Module Get-ChildItemColor
Set-Alias l Get-ChildItem -option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -option AllScope
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme Aliens
美化结果
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)