<?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>Lindesk &#187; bash</title>
	<atom:link href="http://lindesk.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://lindesk.com</link>
	<description>Linux - on the Desktop</description>
	<lastBuildDate>Tue, 23 Jun 2009 14:03:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Customizing the Terminal: 5 Configuration Settings in Bash that makes you a CLI Power User</title>
		<link>http://lindesk.com/2009/04/customize-terminal-configuration-setting-bash-cli-power-user/</link>
		<comments>http://lindesk.com/2009/04/customize-terminal-configuration-setting-bash-cli-power-user/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 19:40:09 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[setting]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=185</guid>
		<description><![CDATA[There are some settings that are very useful if you work on the terminal a lot. Many of the cool ones are not enabled by default - this is a small list of the configuration settings that I use to make my terminal usage more productive.]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">There are some settings that are very useful if you work on the terminal a lot. Many of the cool ones are not enabled by default &#8211; this is a small list of the configuration settings that I use to make my terminal usage more productive.</p>
<p>This is part 3 of the Customizing the Terminal series. Already published posts in this series are&#8230;</p>
<ul>
<li><a href="http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/">Customizing the Terminal: The Prompt</a></li>
<li><a href="http://lindesk.com/2009/03/customizing-the-terminal-create-useful-aliases/">Customizing the Terminal: Create Useful Aliases</a></li>
</ul>
<h2>1. Case Correction</h2>
<p>I like to title case my folders and files&#8217; names. The folders in my home are &#8216;Scripts&#8217;, &#8216;Documents&#8217;, &#8216;Temp&#8217; etc. The first character is in upper case. But when I work on the command line, I don&#8217;t always remember to uppercase the first character when trying to cd into a folder. Consequently, the tabbing will not work. Fortunately, there is an option that <strong class="highlight">auto corrects the case</strong> for you. Just open a terminal and type in this command&#8230;</p>
<pre><code class="bash">shopt -s nocaseglob</code></pre>
<p>Other useful shopt option are&#8230;</p>
<dl>
<dt>cdspell</dt>
<dd>Corrects typos in your file/directory name.</dd>
<dt>histappend</dt>
<dd>Makes sure that histories in multiple simultaneous shells don&#8217;t overwrite each other.</dd>
</dl>
<h2>2. Select Which Commands to Store in History</h2>
<p>By default, all commands you type in are stored in the history. You can pick and chose the commands you want to store by putting the option&#8230;</p>
<pre><code class="bash">export HISTCONTROL=ignorespace</code></pre>
<p>in your <code>~/.bash_profile</code> file. This will <strong class="highlight">make sure that bash don&#8217;t store any command beginning with the space character</strong>. So if you want bash to forget that you typed in &#8216;ls&#8217;, just type in &#8216; ls&#8217;(&lt;space&gt;ls).</p>
<h2>3. Don&#8217;t Store Duplicate Commands in your History</h2>
<p>As I said earlier, all commands you type are stored &#8211; even the duplicate ones. You can prevent this by putting this text in your <code>.bash_profile</code> file&#8230;</p>
<pre><code class="bash">export HISTCONTROL=ignoredups</code></pre>
<p>If you want to ignore spaced commands <em>and</em> want to prevent storing of duplicate commands, use the option&#8230;</p>
<pre><code class="bash">export HISTCONTROL=ignoreboth</code></pre>
<h2>4. Auto-complete Command from History</h2>
<p>Picture this &#8211; you type in &#8217;ssh&#8217; and press the &#8216;Page Up&#8217; key &#8211; and <strong class="highlight">bash automatically fetches the last command that starts with ssh</strong> &#8211; and completes the command for you. Well, its possible &#8211; add the following line in your &#8216;.bash_profile&#8217; file&#8230;</p>
<pre><code class="bash">export INPUTRC=$HOME/.inputrc</code></pre>
<p>Now, <strong class="highlight">create a file called <code>.inputrc</code></strong> in your home and enter this into it&#8230;</p>
<pre><code class="bash">#Page up/page down
"\e[5~": history-search-backward
"\e[6~": history-search-forward</code></pre>
<p>Yes, I am aware of the up Ctrl+R trick &#8211; that comes in the next post.</p>
<h2>5. Infinite History</h2>
<p>You can increase or decrease the size of the history by adding this line in the <code>.bash_profile</code> file&#8230;</p>
<pre><code class="bash">export HISTSIZE=500
export HISTFILESIZE=500</code></pre>
<p>This will limit the commands to be stored in the history to 500. If you want to <strong class="highlight">remove the limit use these</strong> lines&#8230;</p>
<pre><code class="bash">unset HISTSIZE
unset HISTFILESIZE</code></pre>
<p>There is a good chance that this will make your history file quite huge &#8211; <strong class="highlight">use with care</strong>.</p>
<p>Please share your configuration settings for bash in the comments.</p>
<h3>Related Links</h3>
<ul>
<li><a href="http://linux.about.com/library/cmd/blcmdl1_shopt.htm">shopt &#8211; Linux Command</a></li>
<li><a href="http://snipplr.com/view/5393/shopt-shell-options/">shopt (shell options) &#8211; Bash</a></li>
<li><a href="http://www.ducea.com/2006/05/15/linux-tips-take-control-of-your-bash_history/">Linux Tips: take control of your bash_history</a></li>
<li><a href="http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/">15 Examples To Master Linux Command Line History</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/04/customize-terminal-configuration-setting-bash-cli-power-user/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customizing the Terminal: The Prompt</title>
		<link>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/</link>
		<comments>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 18:04:13 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=181</guid>
		<description><![CDATA[Most Linux 'gurus' spend a lot of time working in the terminal. If you belong to that group, this post is for you. This is a tutorial to configure the terminal prompt to the best possible value for your use. Note: This tutorial is for bash users - these instructions will not work in other shells.]]></description>
			<content:encoded><![CDATA[<p><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="Terminal" title="Terminal" width="128" height="128" class="alignnone size-full wp-image-96 intro" align="right" /></p>
<p class="intro">Most Linux &#8216;gurus&#8217; spend a lot of time working in the terminal. If you belong to that group, this post is for you. This is a tutorial to configure the terminal prompt to the best possible value for your use. Note: This tutorial is for bash users &#8211; these instructions will not work in other shells.</p>
<h2>The Prompt</h2>
<p>You must have seen the prompt if you have use the terminal &#8211; it is the first few characters in each line. Usually, it will be&#8230;</p>
<pre><code class="bash">[username@localhost] ~ $</code></pre>
<p>In this case, the user is shown three piece of information in the prompt &#8211; </p>
<ul>
<li>Username of the current user</li>
<li>Hostname</li>
<li>Current folder name</li>
</ul>
<p>This post will show you how to customize this prompt to your needs.</p>
<h3>Editing the Prompt</h3>
<p>Editing the prompt is very simple &#8211; you just have to edit a shell variable. To see the current prompt&#8217;s value, open a shell and type the command&#8230;</p>
<pre><code class="bash">echo $PS1</code></pre>
<p>The result will be something like this(in Ubuntu)&#8230;</p>
<pre><code class="bash">binnyva@binlap:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$</code></pre>
<p>Which is functionally the same as&#8230;</p>
<pre><code class="bash">\u@\h:\W\$ </code></pre>
<p>To edit this variable, run the command&#8230;</p>
<pre><code class="bash">export PS1=&lt;New Prompt Value&gt;</code></pre>
<p>Most desktop systems don&#8217;t need the username and hostname in the prompt &#8211; this is only relevent if your are connected to a remote system. So the first thing to do, if you are on a desktop system, is to remove those two. To do that, run the command&#8230;</p>
<pre><code class="bash">export PS1="[\W]\$ "</code></pre>
<p>This will change the prompt in the current terminal. To make it permanent, edit the ~/.bashrc and set the PS1 variable there. Just add this line at the end of the file&#8230;</p>
<pre><code class="bash">export PS1="[\W]\$ "</code></pre>
<h2>A Better Prompt</h2>
<p>Currently, the prompt has the basename of the current working directory. That is, if we are in &#8216;~/Sites/Lindesk/posts&#8217;, the prompt will be &#8216;[posts]$ &#8216;. This is good enough for most people. But I have a problem with this. If I go to another folder, say, &#8216;~/Sites/<a href="http://www.openjs.com/">OpenJS</a>/posts&#8217;, the prompt is still &#8216;[posts]$ &#8216;. The prompt is a bit ambiguous in this case. This can be done using a different character &#8211; in this case \w(small &#8216;w&#8217; &#8211; the default was capital &#8216;W&#8217;).</p>
<pre><code class="bash">[posts]$ export PS1="[\w]$ "
[~/Sites/OpenJS/posts]$ _</code></pre>
<p>This is nice &#8211; but you will have a problem if the directory you are in is several levels deep. It might be something like this&#8230;</p>
<pre><code class="bash">[/var/www/html/sites/Lindesk/lindesk.com/wp-content/plugins/eventr/langs]$ _</code></pre>
<p>That&#8217;s long &#8211; and inconvenient. There are better ways of doing this.</p>
<h3>Show the Beginning and the End.</h3>
<p>A better way of doing this is to cut of a part of the folder &#8211; so the above path will look something like&#8230;</p>
<pre><code class="bash">[/var/www/html.../eventr/langs] $ _</code></pre>
<p>This option will show the first 15 characters of the path and then the last 15 characters &#8211; if the directory path is bigger than 30 characters. To enable this mode, open up the file <code>~/.bashrc</code> and add this code&#8230;</p>
<pre><code class="bash">PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi'
PS1="[\$CurDir] \$ "</code></pre>
<h3>The First Character of Each Directory</h3>
<p>There is yet another method &#8211; I got this idea from the <a href="http://lindesk.com/2007/04/fishfriendly-interactive-shell/">fish shell</a>. In this approach, the big path will appear as&#8230;</p>
<pre><code class="bash">[/v/w/h/s/L/l/w/p/e/langs] $ _</code></pre>
<p>In this option, only the first character of each parent folder will be shown. Only the base folder name will be shown entirely. This is the approach I use. If you want to use this, open the <code>~/.bashrc</code> file and add this&#8230;</p>
<pre><code class="bash">PROMPT_COMMAND='CurDir=`pwd|sed -e "s!$HOME!~!"|sed -re "s!([^/])[^/]+/!\1/!g"`'
PS1="[\$CurDir] \$ "</code></pre>
<h3>Prompt Variables</h3>
<p>The other values you can insert into the prompt are&#8230;</p>
<dl>
<dt>\d</dt>
<dd>the date in &#8220;Weekday Month Date&#8221; format (e.g., &#8220;Tue May 26&#8243;)</dd>
<dt>\D{format}</dt>
<dd>the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required</dd>
<dt>\e</dt>
<dd>an ASCII escape character (033)</dd>
<dt>\h</dt>
<dd>the hostname up to the first â€˜.â€™</dd>
<dt>\H</dt>
<dd>the hostname</dd>
<dt>\j</dt>
<dd>the number of jobs currently managed by the shell</dd>
<dt>\l</dt>
<dd>the basename of the shellâ€™s terminal device name</dd>
<dt>\n</dt>
<dd>newline</dd>
<dt>\r</dt>
<dd>carriage return</dd>
<dt>\s</dt>
<dd>the name of the shell, the basename of $0 (the portion following the final slash)</dd>
<dt>\t</dt>
<dd>the current time in 24-hour HH:MM:SS format</dd>
<dt>\T</dt>
<dd>the current time in 12-hour HH:MM:SS format</dd>
<dt>\@</dt>
<dd>the current time in 12-hour am/pm format</dd>
<dt>\A</dt>
<dd>the current time in 24-hour HH:MM format</dd>
<dt>\u</dt>
<dd>the username of the current user</dd>
<dt>\v</dt>
<dd>the version of bash (e.g., 2.00)</dd>
<dt>\V</dt>
<dd>the release of bash, version + patch level (e.g., 2.00.0)</dd>
<dt>\w</dt>
<dd>the current working directory, with $HOME abbreviated with a tilde</dd>
<dt>\W</dt>
<dd>the basename of the current working directory, with $HOME abbreviated with a tilde</dd>
<dt>\!</dt>
<dd>the history number of this command</dd>
<dt>\#</dt>
<dd>the command number of this command</dd>
<dt>\$</dt>
<dd>if the effective UID is 0, a #, otherwise a $</dd>
<dt>\nnn</dt>
<dd>the character corresponding to the octal number nnn</dd>
<dt>\\</dt>
<dd>a backslash</dd>
<dt>\[</dt>
<dd>begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt</dd>
<dt>\]</dt>
<dd>end a sequence of non-printing characters</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2009/03/customizing-the-terminal-the-prompt/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Shell Script Language &#8211; Use Perl, Not Bash</title>
		<link>http://lindesk.com/2008/05/shell-script-language-use-perl-not-bash/</link>
		<comments>http://lindesk.com/2008/05/shell-script-language-use-perl-not-bash/#comments</comments>
		<pubDate>Fri, 02 May 2008 18:22:17 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=107</guid>
		<description><![CDATA[
To me, a shell script is a script that automates repetitive tasks. But that is not the &#8216;official&#8217; definition. Wikipedia has this definition&#8230;
A shell script is a script written for the shell, or command line interpreter, of an operating system.
I use a definition that defines the purpose of the script &#8211; while the others prefer [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://lindesk.com/wp-content/uploads/2008/02/terminal.png'><img src="http://lindesk.com/wp-content/uploads/2008/02/terminal.png" alt="" title="Terminal" width="128" height="128" class="alignnone intro size-full wp-image-96" align="right" /></a></p>
<p class="intro">To me, a shell script is a <strong class="highlight">script that automates repetitive tasks</strong>. But that is not the &#8216;official&#8217; definition. Wikipedia has this <a href="http://en.wikipedia.org/wiki/Shell_scripts">definition</a>&#8230;</p>
<blockquote cite="http://en.wikipedia.org/wiki/Shell_scripts"><p>A shell script is a script written for the shell, or command line interpreter, of an operating system.</p></blockquote>
<p>I use a definition that <strong class="highlight">defines the purpose</strong> of the script &#8211; while the others prefer a definition that <strong class="highlight">defines the technology used</strong>. I am not going to claim that my definition is better than the other definition &#8211; that&#8217;s pointless. Besides, even I think that the &#8216;other&#8217; definition is the right one. But I will try to show you the advantages of my approach.</p>
<h2>The Purpose</h2>
<p>I like to automate things(in other words, I&#8217;m lazy). So I have a nice little collection of custom shell scripts. But there is a huge barrier to writing shell scripts &#8211; the language used. <strong class="highlight">Traditionally shell scripts are written in a language provided by the shell</strong> &#8211; like <a href="http://www.gnu.org/software/bash/bash.html">bash</a> or <a href="http://www.tcsh.org/Welcome">tcsh</a>. That is the problem &#8211; these languages are Bad &#8211; with a capital &#8216;B&#8217;.</p>
<h2>The Problem</h2>
<p>To people who are accustomed to decent languages, these <strong class="highlight">shell languages will seem clunky</strong> &#8211; or even evil. But since most shell scripts are small, most people don&#8217;t mind the torture.</p>
<p>In bash, the control flow commands seem to be thrown in as a after thought rather than something that&#8217;s built into the language. If you don&#8217;t believe me, compare the &#8216;if&#8217; loop of bash and Perl.</p>
<h3>Bash</h3>
<p>This code checks wether the variable &#8216;$value&#8217; has the value 0 &#8211; if so it prints the message &#8216;No Value&#8217;</p>
<pre><code class="bash">if [ $value -eq 0 ] ; then
	echo "No Value"
fi</code></pre>
<h3>Perl</h3>
<p>The same code in Perl&#8230;</p>
<pre><code class="perl">if($value == 0) {
	print "No Value";
}</code></pre>
<p>Of course, Perl experts will go for <code>if(!$value)</code> or even <code>unless($value)</code> &#8211; but that&#8217;s not the point. See how better the <strong class="highlight">code looks in Perl</strong>. Yeah, even I am surprised to hear those words &#8211; Perl is considered by many to be an &#8216;ugly&#8217; language. But when compared to shell languages, Perl is a gem(sorry about the pun &#8211; couldn&#8217;t resist).</p>
<h2>The Solution</h2>
<p>The solution is simple &#8211; <strong class="highlight">don&#8217;t use a shell language to write your shell scripts &#8211; use a high level scripting language</strong> like Perl. Or Python, Ruby, PHP, Tcl or <a href="http://www.openjs.com/articles/javascript_scripting_language.php">even JavaScript</a>.</p>
<p>I still use <a href="http://www.openjs.com/articles/javascript_scripting_language.php" title="Command Line Twitter Client">bash to write shell scripts</a> &#8211; but if the shell script has an if condition(other than a simple argument check), I use a higher language &#8211; usually Perl.</p>
<h2>Advantages of using a Shell Language</h2>
<ul>
<li>Its supported in even the tinest linux distros &#8211; even in embedded systems.</li>
<li>Its the method preferred by the majority &#8211; I hope this will change soon.</li>
<li>Command calls look more natural in a shell language.</li>
</ul>
<h2>Advantages of using a High Level Language</h2>
<ul>
<li>Better Code</li>
<li>Easy to maintain</li>
<li>Faster development</li>
<li>Libraries provide a lot of functionality</li>
<li>Easier to port to different platforms.</li>
</ul>
<p>So why am I telling you all this? Two reasons&#8230;</p>
<p>One, the next time you are going to write a shell script, I want you to choose a high level language rather than using bash.</p>
<p>The second reason is that now that <a href="http://lindesk.com/2008/03/top-10-linux-mp3-players/">my series on Linux MP3 Players</a> are over, I am going to take a small break from desktop posts and write on more &#8216;linuxy&#8217; topics. And one of those topic is Shell Scripting. So in the future posts, I am going to share some of my shell scripts with you. So when I publish a Perl script and call it a shell script, I don&#8217;t want you to get confused .</p>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2008/05/shell-script-language-use-perl-not-bash/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>fish(Friendly Interactive Shell)</title>
		<link>http://lindesk.com/2007/04/fishfriendly-interactive-shell/</link>
		<comments>http://lindesk.com/2007/04/fishfriendly-interactive-shell/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 20:00:51 +0000</pubDate>
		<dc:creator>BinnyVA</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fish]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://lindesk.com/?p=3</guid>
		<description><![CDATA[fish(Friendly Interactive Shell) is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out - you will come to the same conclusion as well.]]></description>
			<content:encoded><![CDATA[<p class="intro"><a href="http://fishshell.org/">fish(Friendly Interactive Shell)</a> is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out &#8211; you will come to the same conclusion as well.</p>
<h2>Features of fish</h2>
<h3>Syntax Coloring</h3>
<p>The shell colorizes the commands as you type them &#8211; if it is a valid command it will have a green color. For example, lets say I want to see my network interfaces. Recently, I had a lot of use for that &#8211; but that is another post. So, I type ifconfig into the shell. When I am at &#8216;ifco&#8217;, the shell will be like this&#8230;</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/ifco.png' alt='Ifco - Typing completion' /></p>
<p>When I have completed the command, ifconfig, the shell will be like this&#8230;</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/ifconfig.png' alt='Completed' /></p>
<p>Strings, matching etc. are also highlighted as you type.</p>
<p><img src='http://lindesk.com/wp-content/uploads/2007/04/syntax_highlight.png' alt='Syntax Highlighting' /></p>
<h3>Tab Completion</h3>
<p>You would not think that this is a new feature. Bash has tab completion. Even Windows XP&#8217;s DOS terminal has tab completion. But fish&#8217;s tab completion is no ordinary tab completion &#8211; think of it as <a href="http://fishshell.org/user_doc/index.html#completion">tab completion on steroids</a>.</p>
<p>fish&#8217;s tab completion implements a feature that I really needed &#8211; tab completion for subcommands. Subcommand is the command line argument that is given to some programs. For example,</p>
<pre>yum update gimp
cvs commit file.php</pre>
<p>In the first example, <code>yum</code> is the command an &#8216;<code>update</code>&#8216; is the subcommand. Just type &#8216;yum upd&#8217; and press Tab to complete the command. Similarly in the second case <code>cvs</code> is the command and <code>commit</code> is the subcommand.</p>
<p>Many other completions are also supported&#8230;</p>
<ul>
<li>Commands, both builtins, functions and regular programs.</li>
<li>Environment variable names (Eg. $HOME).</li>
<li>Usernames for tilde(~) expansion.</li>
<li>Filenames, even on strings with wildcards such as &#8216;*&#8217;, &#8216;**&#8217; and &#8216;?&#8217;.</li>
<li>Job id, job name and process names for process expansion. This is very useful when using <code>kill</code>.</li>
</ul>
<p>Enough talking. You can download the fish shell from their official website. For Red Hat/Fedora Core users, this command will do the trick.</p>
<p><code>yum install fish</code></p>
<p>If you are a debian or Ubuntu user, use this command</p>
<p><code>apt-get install fish</code></p>
]]></content:encoded>
			<wfw:commentRss>http://lindesk.com/2007/04/fishfriendly-interactive-shell/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
