0

I can not work out how to change the -b flag and the quoted string to something more readable.

I have tried changing git settings, posh-git settings, and powershell settings. This stack answer was my last hope but I couldn't find which token-flag i need to change :(

Can anyone give an example of how I can change all switches/flags and quoted strings to something brighter? Thanks.

enter image description here

Community
  • 1
  • 1
gingerbreadboy
  • 7,386
  • 5
  • 36
  • 62

1 Answers1

1

From the documentation you referenced:

Parameter
A parameter to a command, always begins with a dash ('-'), followed by the parameter name. Tokens with this kind are always instances of ParameterToken.
[…]
StringExpandable
A double quoted string literal. Tokens with this kind are always instances of StringExpandableToken even if there are no nested tokens to expand.
StringLiteral
A single quoted string literal. Tokens with this kind are always instances of StringLiteralToken.

So this should do what you want:

Set-PSReadlineOption -TokenKind Parameter -ForegroundColor Gray
Set-PSReadlineOption -TokenKind StringExpandable -ForegroundColor Cyan
Set-PSReadlineOption -TokenKind StringLiteral -ForegroundColor Cyan
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
  • Thanks. I had previously tried `Set-PSReadlineOption -TokenKind StringExpandable -ForegroundColor Cyan` and it failed which made me discount this approach. But your first suggestion worked, which seemed strange. So I tried `Set-PSReadlineOption -TokenKind String -ForegroundColor Cyan` and that worked for the strings! – gingerbreadboy May 26 '16 at 13:16