答案 0 :(得分:2)
您还可以在终端设置中设置环境变量:
然后编辑您的powershell配置文件并添加如下内容:
if ($env:CommandColor) {
Set-PSReadLineOption -colors @{ Command = $env:CommandColor}
}
答案 1 :(得分:1)
答案 2 :(得分:1)
请参阅cmdlet Get-PSReadlineOption和Set-PSReadlineOption
您可能要更改:
from selenium import webdriver
# Load proxy option
from selenium.webdriver.common.proxy import Proxy, ProxyType
# Configure Proxy Option
prox = Proxy()
prox.proxy_type = ProxyType.MANUAL
# Proxy IP & Port
prox.http_proxy = "149.215.113.110:70"
# Configure capabilities
capabilities = webdriver.DesiredCapabilities.CHROME
prox.add_to_capabilities(capabilities)
# Configure ChromeOptions
driver = webdriver.Chrome(executable_path='/home/user/Downloads/chromedriver',desired_capabilities=capabilities)
driver.get("http://www.whatsmyip.org/")
或查看当前设置:
Set-PSReadlineOption -Tokenkind Command -BackgroundColor Black
答案 3 :(得分:0)
关于@LotPings答案,我解决了我的问题。 powershell中的以下命令将命令颜色从黄色更改为绿色:
Set-PSReadLineOption -colors @{ Command = "Green"}