<?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: Browsing around the Unix shell more easily</title>
	<atom:link href="http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: MGF</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-58930</link>
		<dc:creator>MGF</dc:creator>
		<pubDate>Tue, 02 Nov 2010 06:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-58930</guid>
		<description>And on the topic of shell options that when enabled can save typing, here are a few, including the cdable_vars option, mentioned earlier:

&lt;code&gt;
autocd
If set, a command name that is the name of a directory
is executed as if it were the argument to the cd com-
mand. This option is only used by interactive shells.

cdable_vars
If set, an argument to the cd builtin command that is
not a directory is assumed to be the name of a variable
whose value is the directory to change to.

cdspell
If set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors
checked for are transposed characters, a missing character, and one character too many. If a correction is
found, the corrected file name is printed, and the command proceeds. This option is only used by interactive
shells.

cmdhist
If set, bash attempts to save all lines of a multiple-
line command in the same history entry. This allows
easy re-editing of multi-line commands.

dirspell
If set, bash attempts spelling correction on directory
names during word completion if the directory name
initially supplied does not exist.
dotglob If set, bash includes filenames beginning with a ‘.’ in
the results of pathname expansion.

histreedit
If set, and readline is being used, a user is given the
opportunity to re-edit a failed history substitution.

histverify
If set, and readline is being used, the results of his-
tory substitution are not immediately passed to the
shell parser. Instead, the resulting line is loaded
into the readline editing buffer, allowing further modi-
fication.

hostcomplete
If set, and readline is being used, bash will attempt to
perform hostname completion when a word containing a @
is being completed (see Completing under READLINE
above).
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>And on the topic of shell options that when enabled can save typing, here are a few, including the cdable_vars option, mentioned earlier:</p>
<p><code><br />
autocd<br />
If set, a command name that is the name of a directory<br />
is executed as if it were the argument to the cd com-<br />
mand. This option is only used by interactive shells.</p>
<p>cdable_vars<br />
If set, an argument to the cd builtin command that is<br />
not a directory is assumed to be the name of a variable<br />
whose value is the directory to change to.</p>
<p>cdspell<br />
If set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors<br />
checked for are transposed characters, a missing character, and one character too many. If a correction is<br />
found, the corrected file name is printed, and the command proceeds. This option is only used by interactive<br />
shells.</p>
<p>cmdhist<br />
If set, bash attempts to save all lines of a multiple-<br />
line command in the same history entry. This allows<br />
easy re-editing of multi-line commands.</p>
<p>dirspell<br />
If set, bash attempts spelling correction on directory<br />
names during word completion if the directory name<br />
initially supplied does not exist.<br />
dotglob If set, bash includes filenames beginning with a ‘.’ in<br />
the results of pathname expansion.</p>
<p>histreedit<br />
If set, and readline is being used, a user is given the<br />
opportunity to re-edit a failed history substitution.</p>
<p>histverify<br />
If set, and readline is being used, the results of his-<br />
tory substitution are not immediately passed to the<br />
shell parser. Instead, the resulting line is loaded<br />
into the readline editing buffer, allowing further modi-<br />
fication.</p>
<p>hostcomplete<br />
If set, and readline is being used, bash will attempt to<br />
perform hostname completion when a word containing a @<br />
is being completed (see Completing under READLINE<br />
above).<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MGF</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-58912</link>
		<dc:creator>MGF</dc:creator>
		<pubDate>Tue, 02 Nov 2010 05:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-58912</guid>
		<description>Another useful command line recall and editing feature is the &#039;fc&#039; builtin:

&lt;code&gt;
$ help fc
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
    Display or execute commands from the history list.
    
    fc is used to list or edit and re-execute commands from the history list.
    FIRST and LAST can be numbers specifying the range, or FIRST can be a
    string, which means the most recent command beginning with that
    string.
    
    Options:
      -e ENAME  select which editor to use.  Default is FCEDIT, then EDITOR,
                then vi
      -l        list lines instead of editing
      -n        omit line numbers when listing
      -r        reverse the order of the lines (newest listed first)
    
    With the `fc -s [pat=rep ...] [command]&#039; format, COMMAND is
    re-executed after the substitution OLD=NEW is performed.
    
    A useful alias to use with this is r=&#039;fc -s&#039;, so that typing `r cc&#039;
    runs the last command beginning with `cc&#039; and typing `r&#039; re-executes
    the last command.
    
    Exit Status:
    Returns success or status of executed command; non-zero if an error occurs.
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Another useful command line recall and editing feature is the &#8216;fc&#8217; builtin:</p>
<p><code><br />
$ help fc<br />
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]<br />
    Display or execute commands from the history list.</p>
<p>    fc is used to list or edit and re-execute commands from the history list.<br />
    FIRST and LAST can be numbers specifying the range, or FIRST can be a<br />
    string, which means the most recent command beginning with that<br />
    string.</p>
<p>    Options:<br />
      -e ENAME  select which editor to use.  Default is FCEDIT, then EDITOR,<br />
                then vi<br />
      -l        list lines instead of editing<br />
      -n        omit line numbers when listing<br />
      -r        reverse the order of the lines (newest listed first)</p>
<p>    With the `fc -s [pat=rep ...] [command]' format, COMMAND is<br />
    re-executed after the substitution OLD=NEW is performed.</p>
<p>    A useful alias to use with this is r='fc -s', so that typing `r cc'<br />
    runs the last command beginning with `cc' and typing `r' re-executes<br />
    the last command.</p>
<p>    Exit Status:<br />
    Returns success or status of executed command; non-zero if an error occurs.<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MGF</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-58910</link>
		<dc:creator>MGF</dc:creator>
		<pubDate>Tue, 02 Nov 2010 05:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-58910</guid>
		<description>pushd and popd are useful.  However, it is too bad that bash does not have the &#039;dunique&#039; option setting, which ensures that duplicate entries are removed from the directory stack when using &#039;pushd&#039; to navigate to a new directory. This can of course be handled by defining &#039;cd&#039;, &#039;pushd&#039;, &#039;popd&#039; function re-implementations.

Also, although file name completion is defined for &#039;cd&#039;, it is not defined for pushd (in /etc/bash_completion).  This can be remedied by something like the following:

&lt;code&gt;
eval `complete -p cd 2&gt;/dev/null &#124; sed -e &#039;s/ cd\$/ pushd/&#039;`
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>pushd and popd are useful.  However, it is too bad that bash does not have the &#8216;dunique&#8217; option setting, which ensures that duplicate entries are removed from the directory stack when using &#8216;pushd&#8217; to navigate to a new directory. This can of course be handled by defining &#8216;cd&#8217;, &#8216;pushd&#8217;, &#8216;popd&#8217; function re-implementations.</p>
<p>Also, although file name completion is defined for &#8216;cd&#8217;, it is not defined for pushd (in /etc/bash_completion).  This can be remedied by something like the following:</p>
<p><code><br />
eval `complete -p cd 2>/dev/null | sed -e 's/ cd\$/ pushd/'`<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MGF</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-58896</link>
		<dc:creator>MGF</dc:creator>
		<pubDate>Tue, 02 Nov 2010 04:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-58896</guid>
		<description>Bash has the &#039;**&#039; wild card capability, under &#039;shopt&#039;:

 globstar
 If set, the pattern ** used in a pathname expansion
 context will match a files and zero or more directories and subdirectories.
 If the  pattern is followed by a /, only directories and subdirectories match.</description>
		<content:encoded><![CDATA[<p>Bash has the &#8216;**&#8217; wild card capability, under &#8216;shopt&#8217;:</p>
<p> globstar<br />
 If set, the pattern ** used in a pathname expansion<br />
 context will match a files and zero or more directories and subdirectories.<br />
 If the  pattern is followed by a /, only directories and subdirectories match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Browsing around the Unix shell more easily at Mark Needham -- Topsy.com</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-36107</link>
		<dc:creator>Tweets that mention Browsing around the Unix shell more easily at Mark Needham -- Topsy.com</dc:creator>
		<pubDate>Wed, 05 May 2010 04:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-36107</guid>
		<description>[...] This post was mentioned on Twitter by Joey Butler. Joey Butler said: Browsing around the Unix shell more easily http://bit.ly/bE9Dw6 Great tip for jumping around different directories. [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Joey Butler. Joey Butler said: Browsing around the Unix shell more easily <a href="http://bit.ly/bE9Dw6" rel="nofollow">http://bit.ly/bE9Dw6</a> Great tip for jumping around different directories. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muness Alrubaie</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-871</link>
		<dc:creator>Muness Alrubaie</dc:creator>
		<pubDate>Wed, 22 Oct 2008 22:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-871</guid>
		<description>Check out http://muness.blogspot.com/2008/06/lazy-bash-cd-aliaes.html for a script that makes creating these aliases easier to create: you only have to specify the parent directory that has all your projects and it creates aliases for all of them.</description>
		<content:encoded><![CDATA[<p>Check out <a href="http://muness.blogspot.com/2008/06/lazy-bash-cd-aliaes.html" rel="nofollow">http://muness.blogspot.com/2008/06/lazy-bash-cd-aliaes.html</a> for a script that makes creating these aliases easier to create: you only have to specify the parent directory that has all your projects and it creates aliases for all of them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Comer</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-867</link>
		<dc:creator>Bill Comer</dc:creator>
		<pubDate>Wed, 22 Oct 2008 15:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-867</guid>
		<description>I have always been a fan of pushd/popd/dirs

I use the following:

alias cdh=&quot;dirs -v&quot;
alias cd=&quot;pushd&quot;
alias cd-=&quot;popd&quot;
alias cd--=&quot;popd;popd&quot;
alias cd---=&quot;popd;popd;popd&quot;

alias up2=&quot;cd ../..&quot;
alias up3=&quot;cd ../../..&quot;

I also like to use:
   alias ll=&quot;ls -lrt&quot;
and my all time favourite:
   alias lds=&quot;ls-l &#124; grep ^drw&quot;

Then 
cd ~1 #will take you to the dir at position 1 in the stack
cd    #rotates the stack. NB default cd is to take you to home directory</description>
		<content:encoded><![CDATA[<p>I have always been a fan of pushd/popd/dirs</p>
<p>I use the following:</p>
<p>alias cdh=&#8221;dirs -v&#8221;<br />
alias cd=&#8221;pushd&#8221;<br />
alias cd-=&#8221;popd&#8221;<br />
alias cd&#8211;=&#8221;popd;popd&#8221;<br />
alias cd&#8212;=&#8221;popd;popd;popd&#8221;</p>
<p>alias up2=&#8221;cd ../..&#8221;<br />
alias up3=&#8221;cd ../../..&#8221;</p>
<p>I also like to use:<br />
   alias ll=&#8221;ls -lrt&#8221;<br />
and my all time favourite:<br />
   alias lds=&#8221;ls-l | grep ^drw&#8221;</p>
<p>Then<br />
cd ~1 #will take you to the dir at position 1 in the stack<br />
cd    #rotates the stack. NB default cd is to take you to home directory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-845</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Tue, 21 Oct 2008 13:30:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-845</guid>
		<description>I use another strategy: I don&#039;t try to make it easier to cd, I remove the need by dedicating one terminal window for one task.

The shade feature of openbox (many other windowmanagers support it, too) helps here, because I can keep most of the terminals shaded, and the cwd is visible in the title bar so I know which terminal to unshade when I need to do any particular task.</description>
		<content:encoded><![CDATA[<p>I use another strategy: I don&#8217;t try to make it easier to cd, I remove the need by dedicating one terminal window for one task.</p>
<p>The shade feature of openbox (many other windowmanagers support it, too) helps here, because I can keep most of the terminals shaded, and the cwd is visible in the title bar so I know which terminal to unshade when I need to do any particular task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wirianto Djunaidi</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-768</link>
		<dc:creator>Wirianto Djunaidi</dc:creator>
		<pubDate>Thu, 16 Oct 2008 01:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-768</guid>
		<description>Another quick one if you don&#039;t want to bother with popd and pushd is to use &quot;cd -&quot; to go to the last directory you were from. Of course this does not work if you traverse your directory one by one manually most of the time. It can be useful if you jump to other directory faraway by using &quot;cd /xyz/abc/def/fda/kfjd&quot;, once you are finish by typicng &quot;cd -&quot; it will bring you back to your original directory.</description>
		<content:encoded><![CDATA[<p>Another quick one if you don&#8217;t want to bother with popd and pushd is to use &#8220;cd -&#8221; to go to the last directory you were from. Of course this does not work if you traverse your directory one by one manually most of the time. It can be useful if you jump to other directory faraway by using &#8220;cd /xyz/abc/def/fda/kfjd&#8221;, once you are finish by typicng &#8220;cd -&#8221; it will bring you back to your original directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Kirby</title>
		<link>http://www.markhneedham.com/blog/2008/10/15/browsing-around-the-unix-shell-more-easily/comment-page-1/#comment-765</link>
		<dc:creator>Dave Kirby</dc:creator>
		<pubDate>Wed, 15 Oct 2008 23:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=498#comment-765</guid>
		<description>Damn, the comment system stripped out my text in angle brackets - that should be &quot;svn TAB&quot; and &quot;ls -TAB&quot; in the penultimate paragraph, and CTRL-N and CTRL-P to move through the history.</description>
		<content:encoded><![CDATA[<p>Damn, the comment system stripped out my text in angle brackets &#8211; that should be &#8220;svn TAB&#8221; and &#8220;ls -TAB&#8221; in the penultimate paragraph, and CTRL-N and CTRL-P to move through the history.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

