Re: Is there a Terminal::ANSIcolor for Windows?

[email protected] (ToddAndMargo via perl6-users)
Newsgroups perl.perl6.users
Message-ID <[email protected]>
>> On Tue, Nov 5, 2024 at 2:54 AM ToddAndMargo via perl6-users <perl6- 
>> [email protected] <mailto:[email protected]>> wrote:
>> 
>>     Windows 11 24H2
>>     RakudoΓäó v2024.07
>> 
>>     [0] > use Terminal::ANSIColor;  # qx[ color ];
>>     Nil
>> 
>>     [1] > print color('bold'), color('52'), "abc", color('reset');
>>     ←[1m←[38;5;52mabc←[0m[1] >
>> 
>>     [1] > print color('bold'), color('red'), "abc", color('reset');
>>     ←[1m←[31mabc←[0m[1] >
>> 

On 11/6/24 04:43, Will Coleda wrote:
> Works for me on windows 11 using the x64 Native Tools Command Prompt for 
> VS 2019, git bash, powershell...
> 
> raku -MTerminal::ANSIColor -e "say color('bold'), 'hello', color('reset')"
> 
> Just prints a bold hello.
> 
> I'm on raku 2024.07, OS Version 10.0.22631 N/A Build 22631, 
> Terminal::ANSIColor:ver<0.9>:auth<zef:lizmat>
> 
> What shell are you using, 

Tested in both:
     C:\Windows\System32\cmd.exe:

          raku -e "use Terminal::ANSIColor; print color('bold'), 
color('red'), 'abc', color('reset');"
←[1m←[31mabc←[0m

and

     C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe:

           raku -e "use Terminal::ANSIColor; print color('bold'), 
color('red'), 'abc', color('reset');"
←[1m←[31mabc←[0m

> what versions of Raku, etc.?

See the first and second line of my original post

I am using a somewhat older version (2024/07) of
Raku as the newer one crashes on some of my
NativeCalls.  I have not had time to troubleshot
it to find out what is wrong or to test against
the absolute latest (2024-10) Rakudo.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.