windows - 如何更改 powershell 中的单个语法着色?

标签 windows powershell

无论出于何种原因,在 powershell 中执行以下命令,

Set-PSReadlineOption -TokenKind Comment -ForegroundColor Gray

破折号后我什么也看不到。 enter image description here

我猜颜色有问题,我正在尝试更改它。关键似乎是选择正确的 TokenKind,已列出(但未记录)here .

我应该更改哪个 TokenKind 才能看到破折号后的文本?

最佳答案

通过实验找到了答案。将其发布给遇到此问题的下一个人。 TokenKindParameter

Set-PSReadlineOption -TokenKind Parameter -ForegroundColor Yellow

关于windows - 如何更改 powershell 中的单个语法着色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52103872/

相关文章:

windows - 为什么错误 80070002 没有描述?

Windows 上的 Linux 容器 (LCOW) 功能与在 Windows 上运行 Linux VM

mysql - MySQL IMPORT 的奇怪行为

c++ - Visual Studio 中代码块中的编译器标志是否有类似物?

powershell - 当我尝试通过 CLI 部署 Azure 云服务时出现 "Object reference not set to an instance of an object"

windows - 用于打印系统路径中每个值的 Powershell 脚本

linux - 在非 Windows 平台上签署 PowerShell 脚本?

PowerShell 方法重载解析错误?

windows - x64 native 工具命令提示符和 x64 交叉工具命令提示符有什么区别?

arrays - PowerShell 杀死多个进程