This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Colours used in mintty


>> I am using
>>
>> echo $'\e]4;3;255,  0,  0\a' # color3 for devices
> 
> Have you tried using "echo -n"?

Don't get in the habit.  Use printf(1) instead:

printf %s %'\e]4;3;255,  0,  0\a'

echo(1) is non-portable when it comes to options, and 'echo -n' will not
behave the same on all shells; you are better off learning the portable
alternative up front, in case you run into a situation where you aren't
using bash.

[I'll leave the fact that $'' is also a non-portable bash-ism for
another discussion]

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]