public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Subshell lost ANSI colors
@ 2016-10-20 19:28 Evgeny Grin
  2016-10-20 20:04 ` Thomas Wolff
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeny Grin @ 2016-10-20 19:28 UTC (permalink / raw)
  To: cygwin

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

User@PcName ~
$ bash

User@PcName ~
$ exit
exit

User@PcName ~
$ mksh
\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$ exit

User@PcName ~
$ fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
User@PcName ~> exit


User@PcName ~
$ sh

User@PcName ~
$ exit
exit

User@PcName ~
$
====================================================================================

Default shell started with installed desktop shortcut (mintty).
bash, sh and fish shells print colorized prompt.
The rest prints ANSI codes.
Same happens in Windows standard console.

Am I doing incorrectly something?


--
Best Wishes,
Evgeny Grin

--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Subshell lost ANSI colors
  2016-10-20 19:28 Subshell lost ANSI colors Evgeny Grin
@ 2016-10-20 20:04 ` Thomas Wolff
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Wolff @ 2016-10-20 20:04 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-20 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 19:28 Subshell lost ANSI colors Evgeny Grin
2016-10-20 20:04 ` Thomas Wolff

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).