<?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>experimentalworks &#187; zsh</title>
	<atom:link href="http://blog.experimentalworks.net/tag/zsh/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.experimentalworks.net</link>
	<description></description>
	<lastBuildDate>Fri, 27 Jan 2012 10:07:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Show exit status of the last executed command in ZSH prompt</title>
		<link>http://blog.experimentalworks.net/2009/12/show-exit-status-of-the-last-executed-command-in-zsh-prompt/</link>
		<comments>http://blog.experimentalworks.net/2009/12/show-exit-status-of-the-last-executed-command-in-zsh-prompt/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:34:17 +0000</pubDate>
		<dc:creator>dsp</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Private]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://blog.experimentalworks.net/2009/12/show-exit-status-of-the-last-executed-command-in-zsh-prompt/</guid>
		<description><![CDATA[We recently stumbled over the problem that we want to know the exit status of the last command that was executed in our ZSH. Well the obvious thing is echoing $?, but as we need this quite often we want to have it in our right prompt. Googling around a little bit, we found ...]]></description>
			<content:encoded><![CDATA[<p>We recently stumbled over the problem that we want to know the exit status of the last command that was executed in our ZSH. Well the obvious thing is echoing $?, but as we need this quite often we want to have it in our right prompt. Googling around a little bit, we found the solution:</p>
<p>In your .zshrc add the following line<br />
<code><br />
RPROMPT='[%?]'<br />
</code><br />
This will give you the last exit status on the right site of your shell.</p>
<p>My zsh now looks like this (with the additional stuff)<br />
<code><br />
buenosaires:~/dev/c/git.git/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (next)[1]<br />
</code></p>
<p class="wp-flattr-button"></p> <p><a href="http://blog.experimentalworks.net/?flattrss_redirect&amp;id=349&amp;md5=b353f110cc3c1549d2764c917326ff0d" title="Flattr" target="_blank"><img src="http://blog.experimentalworks.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.experimentalworks.net/2009/12/show-exit-status-of-the-last-executed-command-in-zsh-prompt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

