public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: 5990 <5990@protonmail.com>
Subject: Re: "cat" breaks ANSI codes on Windows Terminal when piping stdout to python or golang
Date: Wed, 15 Jun 2022 10:04:07 +0900	[thread overview]
Message-ID: <20220615100407.3baf4651172e52ce33181819@nifty.ne.jp> (raw)
In-Reply-To: <AxmOCa0SO8GgPVfc9MByL2p1UzYqW62GNJ-CtHEt0b0ZubXAiVHLy5EG4HLs3HCGDBUTcnAuQckF1g_QlOSZMqVAcbeNBXcVAN0hA0aL7JY=@protonmail.com>

On Tue, 14 Jun 2022 21:56:39 +0000
5990 wrote:
> I ran all commands on cmd from within Windows Terminal. Note that running cmd.exe directly, and running cmd from the Windows Terminal is not the same. cmd.exe does not support ANSI codes.

My question was:
What shell (command user interface) did you run in Windows Terminal?
By default Windows Terminal runs 'Windows PowerShell', however, you
can also run 'Command Prompt' (cmd.exe) in Windows Terminal. You also
can run cygwin bash if you add configuration. What does tab on left
upper of the window of Windows Terminal say?

> Also, what do you mean you can't reproduce the issue? Was it because of insufficient information, or because the commands worked perfectly on your system?

I meant 'cat empty.txt | go run color.go' outputs cyan 'golang-test'
text.

> I noticed you didn't include python information in your environment. You can install the missing lolpython dependency from PiPy by running `pip install lolpython`

Which python implememtation do you use? I guess you do not use cygwin
python. Microsoft store version? Or did you download it from
https://www.python.org/downloads/ ?

I installed Microsoft store version of python (3.10.5) and run
'cat empty.txt | python color.py' from PowerShell in Windows Termianl,
then it outputs gradate-colored 'python-test' text.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2022-06-15  1:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  8:01 5990
2022-06-14 10:47 ` Takashi Yano
2022-06-14 21:53   ` 5990
2022-06-14 21:56     ` 5990
2022-06-15  1:04       ` Takashi Yano [this message]
2022-06-15  4:42         ` Takashi Yano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220615100407.3baf4651172e52ce33181819@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=5990@protonmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).