Pwsh 的安装
Pwsh 的安装:
1 2 3 4 5 6 7 8 $PSVersionTable .PSVersion winget search Microsoft.PowerShell winget install --id Microsoft.Powershell --source winget
使用 Pwsh(PowerShell7)
win+R 键,打开运行,输入 pwsh,即可
Pwsh 配置
添加自动补全 (无需 Tab 键):
1 2 3 4 5 6 7 8 Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -ShowToolTips "C:\Program Files\PowerShell\7\pwsh.exe" -noe -c "&{Set-PSReadLineOption -PredictionSource History -ShowToolTips}" -WorkingDirectory ~
设置快捷键:
点击终端标题栏的下三角键
点击 设置 ,找到 操作
找到 新建标签页 ,修改快捷键为 Ctrl+Alt+T ,保存 即可
Get-PSReadlineOption
可以查看历史命令的保存路径
安装、使用 oh-my-posh
1 2 3 4 5 6 7 8 9 10 winget install oh -my-posh notepad $PROFILE oh -my-posh init pwsh | Invoke-Expression Get-PoshThemes oh -my-posh init pwsh --config "$env:POSH_THEMES_PATH /neko.omp.json" | Invoke-Expression
把 C:\Users\chpw2\AppData\Local\Programs\oh-my-posh\themes
这个路径添加为名叫 POSH_THEMES_PATH
的新建环境变量
安装字体
Firacode 字体文件下载地址
安装好 Firacode 字体后在终端设置里修改字体,保存退出
安装 Scoop
具体查看 Scoop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 Set-ExecutionPolicy RemoteSigned -scope CurrentUser -Force iwr -useb scoop.201704 .xyz | iex irm scoop.201704 .xyz -outfile 'install.ps1' .\install.ps1 -ScoopDir 'E:\Scoop' -ScoopGlobalDir 'E:\GlobalScoopApps' scoop config scoop_branch develop scoop update scoop bucket add <别名> <git 地址 > scoop bucket rm <别名> scoop bucket add dorado https://gitee.com/scoop-installer /dorado scoop bucket add scoopet https://gitee.com/scoop-installer /scoopet scoop bucket add scoopcn https://gitee.com/scoop-installer /scoopcn scoop bucket add scoop-zapps https://gitee.com/scoop-installer /scoop-zapps scoop bucket add echo https://gitee.com/scoop-installer /echo -scoop scoop bucket add aki https://gitee.com/scoop-installer /aki-apps scoop bucket add siku https://gitee.com/scoop-installer /siku scoop bucket add lemon https://gitee.com/scoop-installer /scoop-lemon scoop bucket add cluttered https://gitee.com/scoop-installer /Cluttered-bucket scoop bucket add iszy https://gitee.com/scoop-installer /scoop-iszy scoop bucket add tomato https://gitee.com/scoop-installer /tomato scoop bucket add muggle https://gitee.com/scoop-installer /scoop-muggle scoop bucket known
安装 NeoVim
1 2 3 4 5 6 7 8 scoop install neovim neovide git lazygit gcc ripgrep fd unzip tree-sitter luarocks git clone git@github.com:LazyVim/starter $env:LOCALAPPDATA \nvim --depth =1 Set-Alias -Name vim -Value 'nvim'
NodeJS 安装
NodeJS 安装方法 :
1 2 3 4 5 6 7 8 9 10 winget install Schniz.fnm fnm env --use-on-cd | Out-String | Invoke-Expression fnm use --install-if-missing 20 node -v npm -v