Skip to content

Not all token types are supported #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FallenGameR opened this issue Sep 17, 2013 · 3 comments
Closed

Not all token types are supported #33

FallenGameR opened this issue Sep 17, 2013 · 3 comments
Labels
Issue-Enhancement It's a feature request.

Comments

@FallenGameR
Copy link

Lee Holmes's syntax highlighter http://www.leeholmes.com/blog/2009/02/03/more-powershell-syntax-highlighting/ lists more tokens available for coloring. Here are the tokens that are missing:

Attribute
CommandParameter
CommandArgument
Grouper
Member
StatementSeparator
Property

@lzybkr
Copy link
Contributor

lzybkr commented Sep 17, 2013

Lee's syntax highlighter is based on the V2 parser api and I'm using the V3 api which has much more information but doesn't classify tokens in the same way.

In PSReadline I've made an attempt at adding token kinds I think are most useful. I'm not interested in replicating V2's list, but I'll consider adding specific ones if you ask.

PSReadline supports some of those V2 kinds:

  • Attribute is Type in PSReadline (I'm not sure it's useful to color types and attributes differently)
  • CommandParameter is Parameter in PSReadline

@FallenGameR
Copy link
Author

Could you consider adding coloring support for:

  1. (CommandParameter? Setting of the 'Parameter' token doesn't seem to have effect here)
    '-ea' and '-match' in:
    ls $configsFolder -ea Ignore | where BaseName -match $Dev

  2. (Member?)
    'Attribute' in:
    $replacementColours = @{ Attribute = "DarkCyan" }

@lzybkr
Copy link
Contributor

lzybkr commented Sep 19, 2013

Fixed - ada63b9

I added coloring for Member.
Coloring for Parameter worked fine for me. If it wasn't user error, I'll need a more precise repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement It's a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants