PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

Future: Ternary Operator Highlight

Open msftrncs opened this issue 6 years ago • 1 comments

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.

msftrncs avatar Sep 18 '19 01:09 msftrncs

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.)

lzybkr avatar Sep 26 '19 19:09 lzybkr