美化win10 PowerShell
1. 安装相应的环境
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
2. 安装完成后测试是不是可以导入主题
Import-Module oh-my-posh
// 选择一个主题
Set-Theme 1
// 设置主题
Set-Theme robbyrussell
3.编辑初始化设置文件, 设置自动启动
// 查看文件路径
$profile
// 显示如: C:\Users\avenda\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
// 进入文件目录, 查看是否有此文件, 没有新建有个
C:\Users\avenda\Documents\WindowsPowerShell
新建文件 Microsoft.PowerShell_profile.ps1
在文件中写入
Import-Module oh-my-posh
Set-Theme robbyrussell