
我嘗試使用 PS-ReadLineOption -colors 命令更改 Powershell 顏色,該命令工作正常,只是當我關閉 Powershell 並重新啟動它時,所有內容都會再次設定為預設值。
有沒有辦法保留這些變更?
答案1
我自己找到了解決方案。似乎您無法保存顏色設置,但您可以創建一個 powershell 配置文件腳本並在那裡設置顏色。當您開啟新的 powershell 時,將執行該腳本。
這是一篇關於這些設定檔的文章:https://www.gsx.com/blog/bid/81096/enhance-your-powershell-experience-by-automatically-loading-scripts