microsoft/Terminal

"Incomplete" color schemes are rejected as if they don't exist (possibly only if in fragment)

Open

#11.457 aperta il 7 ott 2021

Vedi su GitHub
 (12 commenti) (1 reazione) (0 assegnatari)C++ (3212 fork)batch import
Area-SettingsHelp WantedIssue-BugPriority-2Product-Terminalgood first issue

Metriche repository

Star
 (35.764 star)
Metriche merge PR
 (Merge medio 27g 19h) (24 PR mergiate in 30 g)

Descrizione

Windows Terminal version (or Windows build number)

1.11.2421.0, 1.10.2383.0

Other Software

No response

Steps to reproduce

Use a color scheme that is "incomplete" in a fragment, use the scheme name's in your default profile.

Example:

{
  "schemes": [
    {
      "name": "Test",
      "background": "#000000",
      "foreground": "#000000",
      "black": "#002b36",
      "red": "#6a4d53",
      "green": "#468666",
      "yellow": "#75896c",
      "blue": "#002b36",
      "magenta": "#6a4d53",
      "cyan": "#468666",
      "white": "#75896c",
      "brightBlack": "#002b36",
      "brightRed": "#002b36",
      "brightGreen": "#002b36",
      "brightYellow": "#002b36",
      "brightBlue": "#002b36",
      "brightMagenta": "#002b36",
      "brightCyan": "#002b36",
      "brightWhite": "#002b36"
    }
  ]
}

Drop in %LOCALAPPDATA\Microsoft\Windows Terminal\Fragments\Test\Test.json, and change settings.json's defaults: colorScheme to Test. Launch WT, get greatly misleading warning.

Notice the use of #11456 here. Else, everything seems to be listed as per the documentation on schemes.

Change "Magenta" to "Purple" on both lines, and watch the fragment suddenly be discoverable and work.

Also note: the colors in this scheme are garbage on purpose, if they're ugly, its working.

Expected Behavior

Either working behavior (with the missing colors replaced with Campbell's) and/or a warning specifically telling me what is wrong with the scheme. At no point should WT tell the user that the scheme doesn't exist without any other warnings that specifically state the scheme was found, but is incomplete.

Actual Behavior

On launch with incomplete scheme in fragment, but specified in settings.json

image

Notice the lack of saying the color scheme exists, but misses elements; it just claims it never existed ever, which leads to a day long wild goose chase.

Guida contributor