【问题标题】:How to change text color between two quotes in PowerShell window如何在 PowerShell 窗口中更改两个引号之间的文本颜色
【发布时间】:2018-08-09 04:01:35
【问题描述】:

我无法更改两个引号之间的文本颜色(现在它的颜色是深蓝色)。 我在哪里可以设置此设置或我必须执行哪个命令?

sample

【问题讨论】:

    标签: powershell settings


    【解决方案1】:

    PSReadline v1.x(在 Windows 10 及更高版本上随 Windows PowerShell v5.1 提供):

    Set-PSReadlineOption -TokenKind String -ForegroundColor Green
    

    PSReadline v2.x(随 PowerShell (Core) v6.1+ 提供):

    Set-PSReadLineOption -Colors @{ String = 'Green' }
    

    注意:

    有关详细信息,请参阅 this answerSet-PSReadlineOption 文档。

    【讨论】:

      猜你喜欢
      • 2016-03-02
      • 1970-01-01
      • 2016-08-31
      • 2023-03-07
      • 1970-01-01
      • 2018-06-05
      • 2016-10-15
      • 1970-01-01
      • 2012-10-15
      相关资源
      最近更新 更多