<?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>tcsh &#8211; Accidents Happen</title>
	<atom:link href="https://ah.thameera.com/tag/tcsh/feed/" rel="self" type="application/rss+xml" />
	<link>https://ah.thameera.com</link>
	<description>In the dark</description>
	<lastBuildDate>Sat, 08 Sep 2012 15:53:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">56521109</site>	<item>
		<title>csh woes</title>
		<link>https://ah.thameera.com/csh-woes/</link>
					<comments>https://ah.thameera.com/csh-woes/#comments</comments>
		
		<dc:creator><![CDATA[thameera]]></dc:creator>
		<pubDate>Sat, 08 Sep 2012 15:53:30 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[csh]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tcsh]]></category>
		<guid isPermaLink="false">http://noisythameera.wordpress.com/?p=64</guid>

					<description><![CDATA[One thing I hate about the C Shell is the lack of function support. You&#8217;re left with aliases but they don&#8217;t work out all the time. The other I wanted to add the git branch you&#8217;re on to the csh (tcsh, in fact) prompt. I tried out adding the following to the .cshrc: alias GIT_BRANCH_CMD &#34;sh [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>One thing I hate about the <a href="http://en.wikipedia.org/wiki/C_shell" target="_blank">C Shell</a> is the lack of function support. You&#8217;re left with <a href="http://en.wikipedia.org/wiki/Alias_(command)" target="_blank">aliases</a> but they don&#8217;t work out all the time.</p>
<p>The other I wanted to add the git branch you&#8217;re on to the csh (tcsh, in fact) prompt. I tried out adding the following to the .cshrc:</p>
<blockquote>
<pre>alias GIT_BRANCH_CMD &quot;sh -c &#039;git branch --no-color 2&gt; /dev/null&#039; | sed -e &#039;/^[^*]/d&#039; -e &#039;s/* (.*)/(1)/&#039;&quot;
alias cd &#039;chdir !*;set prompt=`whoami`@`hostname`&quot;: %~&quot;`GIT_BRANCH_CMD`&quot; &gt; &quot;&#039;
cd ~</pre>
</blockquote>
<p>But it only works when you <em>cd</em> to the directory. Out of luck when you git checkout, etc. To my knowledge csh has no advantage over <a href="http://en.wikipedia.org/wiki/Bash_(Unix_shell)" target="_blank">bash</a>, so the lesson is to use bash whenever possible.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ah.thameera.com/csh-woes/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">64</post-id>	</item>
	</channel>
</rss>
