Terminal: ColorTool: parser bugfixes and small code refactor

Created on 21 Apr 2019  ·  3Comments  ·  Source: microsoft/terminal

I'm using ColorTool as part of managing a theme for cmd / powershell, and I've run into a few issues using it:

  1. Error messages being thrown from parsers that are unused, e.g. the INI parser tries to run even if you are using itermcolors, so it throws errors because XML is not a valid INI file.
  2. Foreground / Background indexes aren't saved when using --defaults (or --both).

These are easy enough fixes and I'm happy to fix them. I was thinking of cleaning up the code a little bit while I'm there, namely:

  1. Allowing parsers to conditionally run, so not all parsers run for every file (should squelch some errors)
  2. Adding a common interface for "setting current console properties" and "console defaults," so it's harder to forget implementing functionality for either.

However, before I start working on this, I wanted to give you a heads-up, and make sure I wasn't working at cross-purposes with someone on the project. Would you be interested in a PR that fixes the above 2 points?

Thanks!

Area-Settings Issue-Bug Product-Colortool Resolution-Fix-Available

All 3 comments

@waf, that would be a very welcome change. Nobody on our side is currently working on either of those.

@DHowett-MSFT thanks, I've opened #418 for this.

I believe this is now available in the release I made a few weeks ago.

Was this page helpful?
0 / 5 - 0 ratings