public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: Subshell lost ANSI colors
Date: Thu, 20 Oct 2016 20:04:00 -0000	[thread overview]
Message-ID: <58091AD9.6090504@towo.net> (raw)
In-Reply-To: <4c9c752a-adbd-c0b1-35ed-59d293c395d8@yandex.ru>

Am 20.10.2016 um 21:06 schrieb Evgeny Grin:
> Hi!
>
> Noticed some time ago: most of subshells lost colors and prints some codes.
> Sample output:
> ====================================================================================
> User@PcName ~
> $ dash
> \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ exit
>
> User@PcName ~
> $ ash
> \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ exit
>
> User@PcName ~
> $ zsh
> \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ exit
>
> ...
> bash, sh and fish shells print colorized prompt.
> The rest prints ANSI codes.
> Same happens in Windows standard console.
>
> Am I doing incorrectly something?
Yes, you expect all shells to have the same capabilities. There are some 
prompt formatting codes in your PS1 that not all shells understand. You 
should set specific PS1 values in shell-specific profiles.
Thomas

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

      reply	other threads:[~2016-10-20 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 19:28 Evgeny Grin
2016-10-20 20:04 ` Thomas Wolff [this message]

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=58091AD9.6090504@towo.net \
    --to=towo@towo.net \
    --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).