PSReadLine
PSReadLine copied to clipboard
Future: Ternary Operator Highlight
I am already testing the future release of PowerShell 7 with support for ternary operator. At present, neither the ? or the : are highlighted special.
Should they be?
Currently, ? is default flagged as TokenFlags TernaryOperator, but : is only default flagged SpecialOperator. To be correctly able to highlight both, : probably needs to be conditionally flagged with TernaryOperator.
It would be a little tricky to do this because PSReadLine builds a single binary that works with all platforms and all versions of PowerShell starting with V5.1 or later (older versions might work, but aren't formally supported by PSReadLine starting with V2.)