<?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>ReadyState4 &#187; bash</title>
	<atom:link href="http://readystate4.com/category/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://readystate4.com</link>
	<description>JavaScript, Web Development, Ruby, and Technology.</description>
	<lastBuildDate>Fri, 04 Jun 2010 19:42:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bash argument unpacking</title>
		<link>http://readystate4.com/2009/09/10/bash-argument-unpacking/</link>
		<comments>http://readystate4.com/2009/09/10/bash-argument-unpacking/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 19:31:14 +0000</pubDate>
		<dc:creator>Mauvis</dc:creator>
				<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://readystate4.com/2009/09/10/bash-argument-unpacking/</guid>
		<description><![CDATA[I&#8217;m not a bash expert but my .bash_profile is packed with shortcut goodness to do all kinds of things on the quick. Most recently, I wondered how to fix up some of my function shortcuts to take any number of arguments (similar to this argument unpacking entry on how to do it in JavaScript and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not a bash expert but my <code>.bash_profile</code> is packed with shortcut goodness to do all kinds of things on the quick. Most recently, I wondered how to fix up some of my function shortcuts to take any number of arguments (similar to this <a href="http://readystate4.com/2008/08/17/javascript-argument-unpacking-converting-an-array-into-a-list-of-arguments/">argument unpacking entry</a> on how to do it in JavaScript and Ruby).</p>
<p>With a little Googling and IM&#8217;ing around to friends (thanks <a href="http://deserialized.com/">Bryan</a>), my limited argument functions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> sc <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #c20cb9; font-weight: bold;">svn</span> commit $<span style="color: #000000;">1</span> $<span style="color: #000000;">2</span> $<span style="color: #000000;">3</span> $<span style="color: #000000;">4</span> $<span style="color: #000000;">5</span> $<span style="color: #000000;">6</span>               
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>now take an unlimited number of arguments:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> sc <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #c20cb9; font-weight: bold;">svn</span> commit $<span style="color: #000000; font-weight: bold;">@</span>               
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://readystate4.com/2009/09/10/bash-argument-unpacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
