aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>2013-05-20 10:14:13 +0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-05-24 23:02:29 -0700
commit1d2cd99e961ad350c85e785192388410c230eb8a (patch)
tree4929ba51c2ebd5c4182ee329fffa11305736cfbc /doc_src
parent994e9fe9de959210904e4b9e78c0aa9690625e64 (diff)
FAQ: add questions from beta site
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/faq.hdr82
1 files changed, 82 insertions, 0 deletions
diff --git a/doc_src/faq.hdr b/doc_src/faq.hdr
index 528f5c23..0da40b49 100644
--- a/doc_src/faq.hdr
+++ b/doc_src/faq.hdr
@@ -1,5 +1,13 @@
/** \page faq Frequently asked questions
+- <a href='#faq-envvar'>How do I set or clear an environment variable?</a>
+- <a href='#faq-login-cmd'>How do I run a command every login? What's fish's equivalent to <tt>.bashrc</tt>?</a>
+- <a href='#faq-prompt'>How do I set my prompt?</a>
+- <a href='#faq-cmd-history'>How do I run a command from history?</a>
+- <a href='#faq-subcommand'>How do I run a subcommand? The backtick doesn't work!</a>
+- <a href='#faq-exit-status'>How do I get the exit status of a command?</a>
+- <a href='#faq-customize-colors'>How do I customize my syntax highlighting colors?</a>
+- <a href='#faq-update-manpage-completions'>How do I update man page completions?</a>
- <a href='#faq-cwd-symlink'>Why does cd, pwd and other fish commands always resolve symlinked directories to their canonical path?</a>
- <a href='#faq-cd-implicit'>I accidentally entered a directory path and fish changed directory. What happened?</a>
- <a href='#faq-open'>The open command doesn't work.</a>
@@ -11,6 +19,80 @@
<hr>
+\section faq-envvar How do I set or clear an environment variable?
+
+Use the <a href="commands.html#set"><code>set</code></a> command:
+
+<pre>set -x key value
+set -e key</pre>
+
+<hr>
+
+\section faq-login-cmd How do I run a command every login? What's fish's equivalent to <tt>.bashrc</tt>?
+
+Edit the file <tt>~/.config/fish/config.fish</tt>, creating it if it does not
+exist. (Note the leading period.)
+
+<hr>
+
+\section faq-prompt How do I set my prompt?
+
+The prompt is the output of the \c fish_prompt function. Put it in
+<tt>~/.config/fish/functions/fish_prompt.fish</tt>. For example, a simple
+prompt is:
+<pre>function fish_prompt
+ set_color $fish_color_cwd
+ echo -n (prompt_pwd)
+ set_color normal
+ echo -n ' > '
+end</pre>
+
+You can also use the Web configuration tool,
+<a href="commands.html#fish_config"><code>fish_config</code></a>, to preview
+and choose from a gallery of sample prompts.
+
+<hr>
+
+\section faq-cmd-history How do I run a command from history?
+
+Type some part of the command, and then hit the up or down arrow keys to
+navigate through history matches.
+
+<hr>
+
+\section faq-subcommand How do I run a subcommand? The backtick doesn't work!
+
+\c fish uses parentheses for subcommands. For example:
+
+<pre>for i in (ls)
+ echo $i
+end</pre>
+
+<hr>
+
+\section faq-exit-status How do I get the exit status of a command?
+
+Use the \c $status variable. This replaces the \c $? variable used in some
+other shells.
+
+<hr>
+
+\section faq-customize-colors How do I customize my syntax highlighting colors?
+
+Use the web configuration tool,
+<a href="commands.html#fish_config"><code>fish_config</code></a>, or alter the
+<a href="index.html#variables-color">\c fish_color family of environment variables</a>.
+
+<hr>
+
+\section faq-update-manpage-completions How do I update man page completions?
+
+Use the
+<a href="commands.html#fish_update_completions"><tt>fish_update_completions</tt></a>
+command.
+
+<hr>
+
\section faq-cwd-symlink Why does cd, $PWD and and various fish commands always resolve symlinked directories to their canonical path?
<i>