<?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: Use pushd and popd for faster CLI navigation</title>
	<atom:link href="http://eriwen.com/bash/pushd-and-popd/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com/bash/pushd-and-popd/</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Sat, 06 Mar 2010 23:29:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tuk</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2776</link>
		<dc:creator>Tuk</dc:creator>
		<pubDate>Sat, 26 Sep 2009 23:10:31 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2776</guid>
		<description>A very userfriendly alternative to homegrown directory navigation utilities is cdargs: http://www.skamphausen.de/cgi-bin/ska/CDargs . It lets you easily add favorite folders and jump to them. And it even has tab-completion.</description>
		<content:encoded><![CDATA[<p>A very userfriendly alternative to homegrown directory navigation utilities is cdargs: <a href="http://www.skamphausen.de/cgi-bin/ska/CDargs" rel="nofollow">http://www.skamphausen.de/cgi-bin/ska/CDargs</a> . It lets you easily add favorite folders and jump to them. And it even has tab-completion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: art-shkola</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2127</link>
		<dc:creator>art-shkola</dc:creator>
		<pubDate>Wed, 28 Jan 2009 11:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2127</guid>
		<description>It`s so intersting!!! I&#039;ll share it!</description>
		<content:encoded><![CDATA[<p>It`s so intersting!!! I&#8217;ll share it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asterisk Cli Command Information « it’S Easy! and Un-Afailable</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2126</link>
		<dc:creator>Asterisk Cli Command Information « it’S Easy! and Un-Afailable</dc:creator>
		<pubDate>Thu, 22 Jan 2009 12:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2126</guid>
		<description>[...] Use pushd and popd for faster CLI navigation - Eric Wendelin’s Blog [...]</description>
		<content:encoded><![CDATA[<p>[...] Use pushd and popd for faster CLI navigation &#8211; Eric Wendelin’s Blog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wendelin</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2125</link>
		<dc:creator>Eric Wendelin</dc:creator>
		<pubDate>Mon, 19 Jan 2009 16:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2125</guid>
		<description>@George:
Nice, thanks!

@Stu:
Interesting. I didn&#039;t realize that was possible. I wish I knew a way to do that.</description>
		<content:encoded><![CDATA[<p>@George:<br />
Nice, thanks!</p>
<p>@Stu:<br />
Interesting. I didn&#8217;t realize that was possible. I wish I knew a way to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stu</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2124</link>
		<dc:creator>Stu</dc:creator>
		<pubDate>Sun, 18 Jan 2009 18:51:55 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2124</guid>
		<description>In tcc (4nt) I&#039;ve set keyboard shortcut aliases for pushd / popd so

alias @@alt-down=pushd
alias @@alt-up=popd
- the @@ means the alias is run immediately


Keyboard shortcut aliases are one thing I really miss in unix terminals - is there any way of doing this ?</description>
		<content:encoded><![CDATA[<p>In tcc (4nt) I&#8217;ve set keyboard shortcut aliases for pushd / popd so</p>
<p>alias @@alt-down=pushd<br />
alias @@alt-up=popd<br />
- the @@ means the alias is run immediately</p>
<p>Keyboard shortcut aliases are one thing I really miss in unix terminals &#8211; is there any way of doing this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Entenman</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2122</link>
		<dc:creator>George Entenman</dc:creator>
		<pubDate>Sat, 17 Jan 2009 17:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2122</guid>
		<description>I&#039;m sorry about the formatting of the previous comment.  It needs more width.

And I left a couple of vestigial comments in the code, which was derived from another function.  Ignore the comments.

-- ge</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry about the formatting of the previous comment.  It needs more width.</p>
<p>And I left a couple of vestigial comments in the code, which was derived from another function.  Ignore the comments.</p>
<p>&#8211; ge</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Entenman</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2121</link>
		<dc:creator>George Entenman</dc:creator>
		<pubDate>Sat, 17 Jan 2009 17:02:10 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2121</guid>
		<description>
This article and its responses, particularly Nico&#039;s, has inspired me to experiment with modifying the CDPATH, which both cd and pushd use.



Here&#039;s an example of what I&#039;ve come up with.  I show the CDPATH, try to pushd to FileMaker, which fails.  Then I add the path to FileMaker to the CDPATH, after which, pushd now works.



$ printenv CDPATH
.:/Users/ge:/Users/ge/Desktop:/Users/ge/Documents:/Users/ge/Documents/Politics:/Library/WebServer/Documents:/Users/ge/Documents/ruby_and_rails/rails/projects
$ pushd FileMaker
-bash: pushd: FileMaker: No such file or directory
$ cdppush ~/Documents/tech/
$ pushd FileMaker
/Users/ge/Documents/tech/FileMaker
~/Documents/tech/FileMaker ~/Documents/tech/FileMaker ~/.profile.d


I created two functions in a file that I source from bash to implement these functions:  The names could be better.


	function cdppush()
	{
		set +o nounset
		#echo &quot;$# args&quot;;
		if [ &quot;X${1}&quot; = &quot;X&quot; ]; then
			#echo &quot;cding to home&quot;;
			builtin cd;
		else
			#echo &quot;adding ${1} to CDPATH&quot;;
			CDPATH=&quot;${*}&quot;
			CDPATH=$CDPATH:.
			CDPATH=$CDPATH:$HOME
			CDPATH=$CDPATH:$HOME/Desktop
			CDPATH=$CDPATH:$HOME/Documents
			CDPATH=$CDPATH:$HOME/Documents/Politics
			CDPATH=$CDPATH:/Library/WebServer/Documents
			CDPATH=$CDPATH:$HOME/Documents/ruby_and_rails/rails/projects
			export CDPATH
			echo &quot;added ${1} to CDPATH [$CDPATH]&quot;;
		fi
	}

	function cdpreset()
	{
		CDPATH=.
		CDPATH=$CDPATH:$HOME
		CDPATH=$CDPATH:$HOME/Desktop
		CDPATH=$CDPATH:$HOME/Documents
		CDPATH=$CDPATH:$HOME/Documents/Politics
		CDPATH=$CDPATH:/Library/WebServer/Documents
		CDPATH=$CDPATH:$HOME/Documents/ruby_and_rails/rails/projects
		export CDPATH
	}



It can&#039;t do pattern searches but it should be easy to remember to say &#039;pushd Documents&#039; for example.
</description>
		<content:encoded><![CDATA[<p>This article and its responses, particularly Nico&#8217;s, has inspired me to experiment with modifying the CDPATH, which both cd and pushd use.</p>
<p>Here&#8217;s an example of what I&#8217;ve come up with.  I show the CDPATH, try to pushd to FileMaker, which fails.  Then I add the path to FileMaker to the CDPATH, after which, pushd now works.</p>
<p>$ printenv CDPATH<br />
.:/Users/ge:/Users/ge/Desktop:/Users/ge/Documents:/Users/ge/Documents/Politics:/Library/WebServer/Documents:/Users/ge/Documents/ruby_and_rails/rails/projects<br />
$ pushd FileMaker<br />
-bash: pushd: FileMaker: No such file or directory<br />
$ cdppush ~/Documents/tech/<br />
$ pushd FileMaker<br />
/Users/ge/Documents/tech/FileMaker<br />
~/Documents/tech/FileMaker ~/Documents/tech/FileMaker ~/.profile.d</p>
<p>I created two functions in a file that I source from bash to implement these functions:  The names could be better.</p>
<p>	function cdppush()<br />
	{<br />
		set +o nounset<br />
		#echo &#8220;$# args&#8221;;<br />
		if [ "X${1}" = "X" ]; then<br />
			#echo &#8220;cding to home&#8221;;<br />
			builtin cd;<br />
		else<br />
			#echo &#8220;adding ${1} to CDPATH&#8221;;<br />
			CDPATH=&#8221;${*}&#8221;<br />
			CDPATH=$CDPATH:.<br />
			CDPATH=$CDPATH:$HOME<br />
			CDPATH=$CDPATH:$HOME/Desktop<br />
			CDPATH=$CDPATH:$HOME/Documents<br />
			CDPATH=$CDPATH:$HOME/Documents/Politics<br />
			CDPATH=$CDPATH:/Library/WebServer/Documents<br />
			CDPATH=$CDPATH:$HOME/Documents/ruby_and_rails/rails/projects<br />
			export CDPATH<br />
			echo &#8220;added ${1} to CDPATH [$CDPATH]&#8220;;<br />
		fi<br />
	}</p>
<p>	function cdpreset()<br />
	{<br />
		CDPATH=.<br />
		CDPATH=$CDPATH:$HOME<br />
		CDPATH=$CDPATH:$HOME/Desktop<br />
		CDPATH=$CDPATH:$HOME/Documents<br />
		CDPATH=$CDPATH:$HOME/Documents/Politics<br />
		CDPATH=$CDPATH:/Library/WebServer/Documents<br />
		CDPATH=$CDPATH:$HOME/Documents/ruby_and_rails/rails/projects<br />
		export CDPATH<br />
	}</p>
<p>It can&#8217;t do pattern searches but it should be easy to remember to say &#8216;pushd Documents&#8217; for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simonmar</title>
		<link>http://eriwen.com/bash/pushd-and-popd/#comment-2120</link>
		<dc:creator>simonmar</dc:creator>
		<pubDate>Sat, 17 Jan 2009 08:23:51 +0000</pubDate>
		<guid isPermaLink="false">http://eriwen.com/?p=459#comment-2120</guid>
		<description>I&#039;ve been using this scheme for years now.  cd = pushd, b = go backwards (popd), f = go forwards (kind of like &quot;unpopd&quot;).

&lt;code&gt;
alias b=&#039;pushd +1&#039;
alias f=&#039;pushd -0&#039;

cd () {
    if [ &quot;$*&quot; = &quot;&quot; ]; then
	  pushd $HOME &gt;/dev/null
    else
	  pushd &quot;$*&quot; &gt;/dev/null
    fi
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using this scheme for years now.  cd = pushd, b = go backwards (popd), f = go forwards (kind of like &#8220;unpopd&#8221;).</p>
<p><code><br />
alias b='pushd +1'<br />
alias f='pushd -0'</p>
<p>cd () {<br />
    if [ "$*" = "" ]; then<br />
	  pushd $HOME &gt;/dev/null<br />
    else<br />
	  pushd "$*" &gt;/dev/null<br />
    fi<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
