This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Subshell lost ANSI colors
- From: Thomas Wolff <towo at towo dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 20 Oct 2016 21:28:25 +0200
- Subject: Re: Subshell lost ANSI colors
- Authentication-results: sourceware.org; auth=none
- References: <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