support wdq colors in microsoft terminal #4798

Open
opened 2026-01-30 23:56:51 +00:00 by claunia · 0 comments
Owner

Originally created by @VladimirAlexiev on GitHub (Nov 4, 2019).

Environment

Microsoft Windows Version 10.0.18362.418, whose cmd includes the new Terminal tab/options (eg see https://devblogs.microsoft.com/commandline/new-experimental-console-features/)

Any other software?

Steps to reproduce

wdq help

Expected behavior

Should show modestly colored output:

image

Actual behavior

Shows escape sequences:

wdq [ MODE ] [ OPTIONS ] [ REQUEST | < REQUEST_FILE ]
Usage:
  Access Wikidata Query Service <https://query.wikidata.org/> via command                                      
  line to perform SPARQL queries ("query" mode), lookup entities ("lookup"),
  or search items and properties ("search" or "psearch"):                                                                                                                                                                     ...
  See the manual for details or get help via "wdq help":                  

Through file

If I save the output to a file (-C explicitly enables color mode) then type or cat the file to the microsoft terminal, the color shows ok:

wdq -C help > wdq-help.txt 
type wdq-help.txt 
cat wdq-help.txt 

The saved file: wdq-help.txt

So I thought the problem may be related to some startup magic? The file starts like this:

>head /cygdrive/c/Strawberry/perl/site/bin/wdq
#!/usr/bin/env perl
use v5.14;

Starting perl explicitly makes no difference:

perl -S wdq help
Originally created by @VladimirAlexiev on GitHub (Nov 4, 2019). # Environment Microsoft Windows Version 10.0.18362.418, whose `cmd` includes the new `Terminal` tab/options (eg see https://devblogs.microsoft.com/commandline/new-experimental-console-features/) Any other software? - Clink v0.4.9 [git:2fd2c2] Copyright (c) 2012-2016 Martin Ridgers http://mridgers.github.io/clink - https://github.com/nichtich/wdq 0.4.4 (/cygdrive/c/Strawberry/perl/site/bin/wdq) - perl v5.28.0 - cygwin # Steps to reproduce ``` wdq help ``` # Expected behavior Should show modestly colored output: ![image](https://user-images.githubusercontent.com/536250/68113597-d5947200-fefc-11e9-9c72-de143016d5df.png) # Actual behavior Shows escape sequences: ``` wdq [ MODE ] [ OPTIONS ] [ REQUEST | < REQUEST_FILE ] Usage: Access Wikidata Query Service <https://query.wikidata.org/> via command line to perform SPARQL queries ("query" mode), lookup entities ("lookup"), or search items and properties ("search" or "psearch"): ... See the manual for details or get help via "wdq help": ``` # Through file If I save the output to a file (`-C` explicitly enables color mode) then `type` or `cat` the file to the microsoft terminal, the color shows ok: ``` wdq -C help > wdq-help.txt type wdq-help.txt cat wdq-help.txt ``` The saved file: [wdq-help.txt](https://github.com/microsoft/terminal/files/3803499/wdq-help.txt) So I thought the problem may be related to some startup magic? The file starts like this: ``` >head /cygdrive/c/Strawberry/perl/site/bin/wdq #!/usr/bin/env perl use v5.14; ``` Starting perl explicitly makes no difference: ``` perl -S wdq help ```
claunia added the Issue-QuestionNeeds-TriageArea-VTNeeds-Tag-FixNeeds-Attention labels 2026-01-30 23:56:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4798