How can I reset the powershell colors

后端 未结 10 1295
梦毁少年i
梦毁少年i 2021-01-30 20:08

I changed the colors of the powershell and now I can\'t change the color of the input text, is always yellow.

I changed the color of the background and

10条回答
  •  长发绾君心
    2021-01-30 20:54

    Edit: as pointed out by @dhobbs in the comments, this is no longer an option in PowerShell 6: https://docs.microsoft.com/en-us/powershell/module/PSReadline/Set-PSReadlineOption?view=powershell-6.

    Resetting the PowerShell console colors to their defaults can be done with the following command:

    Set-PSReadlineOption -ResetTokenColors 
    

    Documentation here: https://msdn.microsoft.com/en-us/powershell/reference/5.1/psreadline/set-psreadlineoption

    Add the line to your PowerShell profile to make it have the command run each time a PowerShell console is opened. To see the location of your PowerShell profile, from a PowerShell console type:

    $profile
    

提交回复
热议问题