gpt4 book ai didi

powershell - 更改 PowerShell PSReadLine MenuComplete 函数的颜色

转载 作者:行者123 更新时间:2023-12-01 04:48:08 25 4
gpt4 key购买 nike

我目前正在玩PSReadLine PowerShell 中的模块选项。特别是我正在设置一个自定义颜色主题。我已经能够使用以下语法设置我需要的大部分颜色作为示例:Set-PSReadLineOption -TokenKind Variable -ForegroundColor DarkYellow
但是,当我使用 MenuComplete PSReadLine 的功能模块按 Ctrl+Spacebar建议在 DarkGreen 中突出显示而且我似乎找不到改变这些颜色的方法。

最佳答案

我在旧的颜色设置中没有看到这个选项,但是从 6.1.0 开始,可以更改Selection的颜色像这样:

$colors = @{
"Selection" = "$([char]0x1b)[38;2;0;0;0;48;2;178;255;102m"
}

Set-PSReadLineOption -Colors $colors

enter image description here

关于powershell - 更改 PowerShell PSReadLine MenuComplete 函数的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44758698/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com