00-powershell配置

randolf2022年6月6日
大约 1 分钟

00-powershell配置

00-powershell 配置

定义

配置好看的 Powershell !!

方案

安装主题 Oh-My-Posh

其余的抄两个引文即可

此外在设置自动补全时会遇见: A parameter cannot be found that matches parameter name 'PredictionViewStyle'

解决方案:

  1. Get-InstalledModule -Name psreadline -AllVersions | Uninstall-Module
  2. To install latest Beta release, open Admin CMD:
    1. pwsh.exe -noprofile -command "Install-Module PSReadLine -Force -AllowPrerelease -SkipPublisherCheck"

使用 update-help 更新帮助时,会遇见问题:

是因为 PSReadLine 老版本的 Line 被认为是 line,从而找不到包。

Update-Help: Failed to update Help for the module(s) 'ConfigDefenderPerformance, Dism, Get-NetView, Kds, NetQos, PcsvDevice, PKI, PSReadline, Whea, WindowsUpdate' with UI culture(s) {zh-CN} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).).English-US help content is available and can be installed using: Update-Help -UICulture en-US.

解决方案:

 Update-Help -Verbose -Force -ErrorAction SilentlyContinue -UICulture en-US

参考

引文
脚注
Loading...