I have beautified my Powershell according to this blog, but the Operator
and Parameter
are grey as follows:
So I change their colors by Set-PSReadlineOption
:
Set-PSReadlineOption -TokenKind Operator -ForegroundColor Yellow
but get the following errors:
Set-PSReadLineOption : A parameter cannot be found that matches parameter name 'TokenKind'。
所在位置 行:1 字符: 22
- Set-PSReadlineOption -TokenKind Operator -ForegroundColor Yellow
- CategoryInfo : InvalidArgument: (:) [Set-PSReadLineOption],ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.SetPSReadLineOption
But the help documents of Set-PSReadlineOption
shows that it has a TokenKind
parameter which in turn can have Operator
as its parameter.
I'm confused why this error happens.
My powershell version is
Thanks for any suggestions!