<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arkham's Eyrie &#187; bash</title>
	<atom:link href="http://ark.asengard.net/blog/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://ark.asengard.net/blog</link>
	<description>Where Doves Kill &#38; Ravens Die.</description>
	<lastBuildDate>Fri, 28 Oct 2011 09:09:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to colorize bash prompt easily</title>
		<link>http://ark.asengard.net/blog/2009/06/24/how-to-colorize-bash-prompt/</link>
		<comments>http://ark.asengard.net/blog/2009/06/24/how-to-colorize-bash-prompt/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 18:02:34 +0000</pubDate>
		<dc:creator>Arkham</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://ark.asengard.net/blog/?p=792</guid>
		<description><![CDATA[Sometimes, the bash prompt can look a little dull and it may become difficult to recognize where the output of a command ends. Here I provide with a very simple way to customize your bash prompt by adding some colors. First of all, add these colors definition to your .bashrc ## Fancy colors red='\[\e[0;31m\]' RED='\[\e[1;31m\]' [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-798 aligncenter" title="lost_numbers_fan" src="http://ark.asengard.net/blog/wp-content/plugins/image-shadow/cache/2f99a49f04f85db277424a9aeeac11df.jpg" alt="lost_numbers_fan" width="465" height="313" /></p>
<p>Sometimes, the bash prompt can look a little dull and it may become difficult to recognize where the output of a command ends. Here I provide with a very simple way to customize your bash prompt by adding some colors.</p>
<p>First of all, add these colors definition to your .bashrc</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Fancy colors</span>
<span style="color: #007800;">red</span>=<span style="color: #ff0000;">'\[\e[0;31m\]'</span>
<span style="color: #007800;">RED</span>=<span style="color: #ff0000;">'\[\e[1;31m\]'</span>
<span style="color: #007800;">blue</span>=<span style="color: #ff0000;">'\[\e[0;34m\]'</span>
<span style="color: #007800;">BLUE</span>=<span style="color: #ff0000;">'\[\e[1;34m\]'</span>
<span style="color: #007800;">cyan</span>=<span style="color: #ff0000;">'\[\e[0;36m\]'</span>
<span style="color: #007800;">CYAN</span>=<span style="color: #ff0000;">'\[\e[1;36m\]'</span>
<span style="color: #007800;">black</span>=<span style="color: #ff0000;">'\[\e[0;30m\]'</span>
<span style="color: #007800;">BLACK</span>=<span style="color: #ff0000;">'\[\e[1;30m\]'</span>
<span style="color: #007800;">green</span>=<span style="color: #ff0000;">'\[\e[0;32m\]'</span>
<span style="color: #007800;">GREEN</span>=<span style="color: #ff0000;">'\[\e[1;32m\]'</span>
<span style="color: #007800;">yellow</span>=<span style="color: #ff0000;">'\[\e[0;33m\]'</span>
<span style="color: #007800;">YELLOW</span>=<span style="color: #ff0000;">'\[\e[1;33m\]'</span>
<span style="color: #007800;">magenta</span>=<span style="color: #ff0000;">'\[\e[0;35m\]'</span>
<span style="color: #007800;">MAGENTA</span>=<span style="color: #ff0000;">'\[\e[1;35m\]'</span>
<span style="color: #007800;">white</span>=<span style="color: #ff0000;">'\[\e[0;37m\]'</span>
<span style="color: #007800;">WHITE</span>=<span style="color: #ff0000;">'\[\e[1;37m\]'</span>
<span style="color: #007800;">NC</span>=<span style="color: #ff0000;">'\[\e[0m\]'</span> <span style="color: #666666; font-style: italic;"># No Color</span></pre></div></div>

<p>The variables you want to use are</p>
<ul>
<li>\u &#8211; username</li>
<li>\h &#8211; host name</li>
<li>\w &#8211; current absolute path</li>
<li>\W for current relative path</li>
<li>\$ &#8211; te prompt character (eg. &#8216;#&#8217;)</li>
</ul>
<p>For example, my current setup looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${green}</span>\u<span style="color: #007800;">${NC}</span>@<span style="color: #007800;">${green}</span>\h <span style="color: #007800;">${BLUE}</span>\w<span style="color: #007800;">${NC}</span> <span style="color: #007800;">${GREEN}</span><span style="color: #000099; font-weight: bold;">\$</span> <span style="color: #007800;">${NC}</span> &quot;</span></pre></div></div>

<p>Enjoy <img src='http://ark.asengard.net/blog/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ark.asengard.net/blog/2009/06/24/how-to-colorize-bash-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

