我正在尝试在 Windows 终端中使用 Cmder。我尝试遵循 this指南,我按照它说的做了一切。
但是,有一个小问题。无论我做什么,提示背景颜色都不会改变,它保持黑色。
我无法弄清楚这个问题。有什么建议吗?
最佳答案
在同一篇文章的评论部分
I ran into this issue as well and was able to get it working. In your "%cmder_root%\config" directory, create a file called "my_prompt.lua" and add the following to it:
function my_prompt_filter()
cwd = clink.get_cwd()
prompt = "\x1b[1;32;49m{cwd} {git}{hg}{svn} \n\x1b[1;39;49m{lamb} \x1b[0m"
new_value = string.gsub(prompt, "{cwd}", cwd)
clink.prompt.value = string.gsub(new_value, "{lamb}", "λ")
end
clink.prompt.register_filter(my_prompt_filter, 1)
关于windows - 使用 Windows 终端的 Cmder 颜色错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67541540/