<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hack 37. Change foreground color of the prompt</title>
	<atom:link href="http://linux.101hacks.com/ps1-examples/change-prompt-foreground-color/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.101hacks.com/ps1-examples/change-prompt-foreground-color/</link>
	<description>Free eBook to Build a Strong Foundation in UNIX / Linux</description>
	<lastBuildDate>Thu, 01 Dec 2011 10:33:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Color prompts screws bash !</title>
		<link>http://linux.101hacks.com/ps1-examples/change-prompt-foreground-color/comment-page-1/#comment-929</link>
		<dc:creator>Color prompts screws bash !</dc:creator>
		<pubDate>Sun, 08 Aug 2010 06:48:15 +0000</pubDate>
		<guid isPermaLink="false">http://linux.101hacks.com/?p=159#comment-929</guid>
		<description>[...] call then at will... ok, when? Why? Where? basically to do what ?  The whole thing comes from here: linux.101hacks.com and now I&#039;m guessing their missing escape sequences there.  Thx again for da speed.  Speed: If you [...]</description>
		<content:encoded><![CDATA[<p>[...] call then at will&#8230; ok, when? Why? Where? basically to do what ?  The whole thing comes from here: linux.101hacks.com and now I&#39;m guessing their missing escape sequences there.  Thx again for da speed.  Speed: If you [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Motherdawg</title>
		<link>http://linux.101hacks.com/ps1-examples/change-prompt-foreground-color/comment-page-1/#comment-928</link>
		<dc:creator>Motherdawg</dc:creator>
		<pubDate>Sun, 08 Aug 2010 06:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://linux.101hacks.com/?p=159#comment-928</guid>
		<description>I got it to work... with some help from penguiniator &amp; David the H. over at linuxquestions.org.

I think your missing escape sequences:
This work ok:  PS1=&quot;\[\e[0;31m\][\t][\u@\h:\w][\!]\\$ \[\e[m\]&quot;
Compared to:     PS1=”\e[0;31m[\t][\u@\h:\w][\!]\\$ \e[m&quot;

Kewl
Cya &amp; thx.</description>
		<content:encoded><![CDATA[<p>I got it to work&#8230; with some help from penguiniator &amp; David the H. over at linuxquestions.org.</p>
<p>I think your missing escape sequences:<br />
This work ok:  PS1=&#8221;\[\e[0;31m\][\t][\u@\h:\w][\!]\\$ \[\e[m\]&#8221;<br />
Compared to:     PS1=”\e[0;31m[\t][\u@\h:\w][\!]\\$ \e[m&#8221;</p>
<p>Kewl<br />
Cya &amp; thx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Motherdawg</title>
		<link>http://linux.101hacks.com/ps1-examples/change-prompt-foreground-color/comment-page-1/#comment-927</link>
		<dc:creator>Motherdawg</dc:creator>
		<pubDate>Sat, 07 Aug 2010 22:09:14 +0000</pubDate>
		<guid isPermaLink="false">http://linux.101hacks.com/?p=159#comment-927</guid>
		<description>Hi guys,

I got a good one!
I colorized my prompt as follow; Green for normal user, Red for root:
Root .bashrc:
PS1=&quot;\e[0;31m[\t][\u@\h:\w][\!]\\$ \e[m&quot;
User .bashrc:
PS1=&quot;\e[0;37m[\t][\u@\h:\w][\!]\\$ \e[m&quot;
Which gives:
[17:53:18][root@T42:/home/netweezurd][93]# 
in technicolor...

When the command I&#039;m typing is longer than the screen, the cursor returns to the left margin but not to a new line anymore, if I continue typing it kind of overwrite the prompt on the same line. If I backup it does jump one line up and ends up on the line of the previous command... in emptiness... unworkable !

Right now I&#039;m putting nix on a usbkey and it&#039;s giving me:
[17:53:18][root@T42:/home/netweezurd][93]# ^C
[17:53:18][root@T42:/home/netweezurd][93]#  livecd-iso-to-disk --overlay-size-mb 512 --format --reset-mbr Fedora-13-i686-Live-Security/Fedora-13-i686-Live-Security.iso /dev/sdb1weezurd][93]#

I dunno if you can figure it, the weezurd part at the end is on the same line, the cursor just wrapped around.

My normal no color prompt does not do that.
PS1=&quot;[\t][\u@\h:\w][\!]\\$ &quot;

Linux T42.mobile1 2.6.33.6-147.2.4.fc13.i686 #1 SMP Fri Jul 23 17:27:40 UTC 2010 i686 i686 i386 GNU/Linux

Any clues ???</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>I got a good one!<br />
I colorized my prompt as follow; Green for normal user, Red for root:<br />
Root .bashrc:<br />
PS1=&#8221;\e[0;31m[\t][\u@\h:\w][\!]\\$ \e[m"<br />
User .bashrc:<br />
PS1="\e[0;37m[\t][\u@\h:\w][\!]\\$ \e[m"<br />
Which gives:<br />
[17:53:18][root@T42:/home/netweezurd][93]#<br />
in technicolor&#8230;</p>
<p>When the command I&#8217;m typing is longer than the screen, the cursor returns to the left margin but not to a new line anymore, if I continue typing it kind of overwrite the prompt on the same line. If I backup it does jump one line up and ends up on the line of the previous command&#8230; in emptiness&#8230; unworkable !</p>
<p>Right now I&#8217;m putting nix on a usbkey and it&#8217;s giving me:<br />
[17:53:18][root@T42:/home/netweezurd][93]# ^C<br />
[17:53:18][root@T42:/home/netweezurd][93]#  livecd-iso-to-disk &#8211;overlay-size-mb 512 &#8211;format &#8211;reset-mbr Fedora-13-i686-Live-Security/Fedora-13-i686-Live-Security.iso /dev/sdb1weezurd][93]#</p>
<p>I dunno if you can figure it, the weezurd part at the end is on the same line, the cursor just wrapped around.</p>
<p>My normal no color prompt does not do that.<br />
PS1=&#8221;[\t][\u@\h:\w][\!]\\$ &#8221;</p>
<p>Linux T42.mobile1 2.6.33.6-147.2.4.fc13.i686 #1 SMP Fri Jul 23 17:27:40 UTC 2010 i686 i686 i386 GNU/Linux</p>
<p>Any clues ???</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Content Delivery Network via Amazon Web Services: CloudFront: static.101hacks.com

Served from: linux.101hacks.com @ 2012-02-04 04:48:24 -->
