powershell - Windows PowerShell 更改标志的文本颜色

标签 powershell

我最近安装了 Windows ColorTool并且一直在玩弄它。我将它与 iTerm color schemes 一起使用但我遇到了一些颜色冲突。

enter image description here

该行应该说 .\colortool -b .\schemes\.OneHalfDark.itermcolors,但 -b 标志当前与背景颜色相同.如何仅更改标志的颜色?

最佳答案

我遇到了同样的问题——旗帜的默认颜色是深灰色。我使用 PSReadlineOption 来更改它

例如

Set-PSReadlineOption -TokenKind 参数 -ForegroundColor 青色

这只适用于当前的 powershell 窗口,所以我假设您需要将它添加到 powershell 配置文件以继续使用,或者每次使用 powershell 时运行此 cmdlet

关于powershell - Windows PowerShell 更改标志的文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50630022/

相关文章:

mysqldump - 如果不存在则创建表

powershell - 如何使用PowerShell从文本文件中的行尾删除空格

regex - 正则表达式替换以某个子字符串开头的所有单词的所有出现

powershell - 读主机执行顺序

powershell - 如何使用 Powershell 获取并更改注册表中 "(Standard)"项的值

windows - 如何访问位于 Windows 上具有保留系统名称(如 "CON")的文件夹中的本地文件?

date - 键盘上的Powershell日期

regex - 如何查找和替换文本文件中所有出现的 "(percentage)%"并替换为用户提供的整数

驱动器号和冒号后没有斜杠的 Windows 路径 - 它指向什么?

c# - 在长时间运行的进程中禁用 Windows 更新