Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 3f0657a9f30ee88f296a400e5fdb1578 > files > 16

fish-1.23.0-2mdv2010.0.i586.rpm

<html>
<head>
<title>fish user documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--
Override the default doxygen stylesheet to make the difference between different header levels larger
-->
<style type='text/css'>
H1
{
	font-size: 180%;
}
H2
{
	font-size: 150%;
}
H3
{
	padding-left:10%;
	font-size: 120%;
}
H4
{
	padding-left:10%;
	font-style: italic;
	font-weight: normal;
	font-size: 90%;
}
</style>
</head>
<body>

<div class="qindex">

 <a class="qindex" href="http://www.fishshell.org"><tt>fish</tt> home</a> 
|
 <a class="qindex" href="index.html">Main documentation page</a> 
|
<a class="qindex" href="design.html">Design document</a>
|
<a class="qindex" href="commands.html">Commands</a>
|
<a class="qindex" href="faq.html">FAQ</a>
|
<a class="qindex" href="license.html">License</a>
 
</div>

<!-- Generated by Doxygen 1.4.4 -->
<h1><a class="anchor" name="faq">Frequently asked questions</a></h1><ul>
<li><a href="#faq-cwd-symlink">Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path?</a></li><li><a href="#faq-cd-autocomplete">Why does the cd command autocompletion list the subdirectories of my home directory as completions?</a></li><li><a href="#faq-cd-implicit">I accidentally entered a directory path and fish changed directory.  What happened?</a></li><li><a href="#faq-open">The open command doesn't work.</a></li><li><a href="#faq-default">How do I make fish my default shell?</a></li><li><a href="#faq-titlebar">I'm seeing weird output before each prompt when using screen. What's wrong?</a></li><li><a href="#faq-greeting">How do I change the greeting message?</a></li></ul>
<p>
<hr>
<h2><a class="anchor" name="faq-cwd-symlink">
Why does cd, $PWD and and various fish commands always resolve symlinked directories to their canonical path?</a></h2>
<em> For example if ~/images is a symlink to ~/Documents/Images, if I write 'cd images', my prompt will say ~/D/Images, not ~/images. </em><p>
Because it is impossible to consistently keep symlinked directories unresolved. It is indeed possible to do this partially, and many other shells do so. But it was felt there are enough serious corner cases that this is a bad idea. Most such issues have to do with how '..' is handled, and are varitations of the following example:<p>
Writing <code>cd images; ls ..</code> given the above directory structure would list the contents of ~/Documents, not of ~, even though using <code>cd ..</code> changes the current direcotry to ~, and the prompt, the pwd builtin and many other directory information sources suggest that the the current directory is ~/images and it's parent is ~. This issue is not possible to fix without either making every single command into a builtin, breaking Unix semantics or implementing kludges in every single command.<p>
This issue can also be seen when doing IO redirection.<p>
Another related issue is that many programs that operate on recursive directory trees, like the find command, silently ignore symlinked directories. For example, <code>find $PWD -name '*.txt'</code> silently fails in shells that don't resolve symlinked paths.<p>
<hr>
<h2><a class="anchor" name="faq-cd-autocomplete">
Why does the cd command autocompletion list the subdirectories of my home directory as completions?</a></h2>
Because they are completions. In fish, if you specify a relative directory to the cd command, i.e. any path that does not start with either './' or '/', the environment variable CDPATH will be examined, and any directories in this path is used as a base direcotry. To disable this feature, write <code>set CDPATH .</code> on the commandline.<p>
<hr>
<h2><a class="anchor" name="faq-cd-implicit">
I accidentally entered a directory path and fish changed directory. What happened?</a></h2>
If fish is unable to locate a command with a given name, fish will test if a directory of that name exists. If it does, it is implicitly assumed that you want to change working directory. For example, the fastest way to switch to your home directory is to simply type <code>~</code>.<p>
<hr>
<h2><a class="anchor" name="faq-open">
The open command doesn't work.</a></h2>
The open command uses the mimetype database and the .desktop files used by Gnome and KDE to identify filetypes and default actions. If at least one of these two desktops are installed, but the open command is not working, this probably means that the relevant files are installed in a nonstandard location. Please contact the fish mailing list, and hopefully this can be resolved.<p>
<hr>
<h2><a class="anchor" name="faq-default">
How do I make fish my default shell?</a></h2>
If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local) as root:<p>
<code>echo /usr/local/bin/fish &gt;&gt;/etc/shells</code><p>
If you installed a prepackaged version of fish, the package manager should have already done this for you.<p>
In order to change your default shell, type:<p>
<code>chsh -s /usr/local/bin/fish</code><p>
You may need to adjust the above path to e.g. /usr/bin/fish. Use the command <code>which fish</code> if you are unsure of where fish is installed.<p>
You will need to log out and back in again for the change to take effect.<p>
<hr>
<h2><a class="anchor" name="faq-titlebar">
I'm seeing weird output before each prompt when using screen. What's wrong?</a></h2>
Quick answer:<p>
Run the following command in fish:<p>
<pre>
echo function fish_title;end ~/.config/fish/config.fish
</pre><p>
Problem solved!<p>
The long answer:<p>
Fish is trying to set the titlebar message of your terminal. While screen itself supports this feature, your terminal does not. Unfortuntaly, when the underlying terminal doesn't support setting the titlebar, screen simply passes through the escape codes and text to the underlying terminal instead of ignoring them. It is impossible detect and resolve this problem from inside fish since fish has no way of knowing what the underlying terminal type is. For now, the only way to fix this is to unset the titlebar message, as suggested above.<p>
Note that fish has a default titlebar message, which will be used if the fish_title function is undefined. So simply unsetting the fish_title function will not work.<p>
<hr>
<h2><a class="anchor" name="faq-greeting">
How do I change the greeting message?</a></h2>
Change the value of the variable fish_greeting. For example, to remove the greeting use:<p>
<pre>
set fish_greeting
</pre> <hr size="1"><address style="align: right;"><small>Generated on Sun Jan 13 02:47:40 2008 for fish by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>