How to change text color between two quotes in PowerShell window

ぃ、小莉子 提交于 2019-12-04 02:40:47

问题


I can't change the text color between two quotes (now its color is durk-blue). Where can I set up this setting or which command I have to execute?

sample


回答1:


PSReadline v1.x (as shipped with Windows PowerShell v5.1):

Set-PSReadlineOption -TokenKind String -ForegroundColor Green

PSReadline v2.x (as shipped with PowerShell Core 6.1.0):

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

In both cases you can use the colors defined in the [ConsoleColor] enumeration type.

In v2.x you can alternatively use Virtual Terminal escape sequences.

See Get-Help Set-PSReadlineOption



来源:https://stackoverflow.com/questions/51758639/how-to-change-text-color-between-two-quotes-in-powershell-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!