More documentation tweaks

darcs-hash:20051204023353-ac50b-196f21f186237d5e7074667fc86f2172a7ac40e2.gz
This commit is contained in:
axel 2005-12-04 12:33:53 +10:00
parent 02083a1bd7
commit 2bc2e0b9ec
2 changed files with 17 additions and 5 deletions

View file

@ -4,6 +4,11 @@
<tt>complete (-c|--command|-p|--path) COMMAND [(-s|--short-option) SHORT_OPTION] [(-l|--long-option|-o|--old-option) LONG_OPTION [(-a||--arguments) OPTION_ARGUMENTS] [(-d|--description) DESCRIPTION] </tt>
\subsection complete-description Description
For an introduction to how to specify completions, see the section <a
href='index.html#completions-own'>Writing your own completions</a> of
the fish manual.
- <tt>COMMAND</tt> is the name of the command for which to add a completion
- <tt>SHORT_OPTION</tt> is a one character option for the command
- <tt>LONG_OPTION</tt> is a multi character option for the command
@ -61,7 +66,9 @@ are valid, like the \c nodeps switch.
This can be written as:
<tt>complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d 'Dont check dependencies'</tt>
<tt>complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d
"Don't check dependencies"</tt>
where \c __fish_contains_opt is a function that checks the commandline buffer for the presense of a specified set of options.
where \c __fish_contains_opt is a function that checks the commandline
buffer for the presense of a specified set of options.

View file

@ -7,9 +7,11 @@ href="http://roo.no-ip.org/fish/"><tt>fish</tt> homepage</a>.
\section syntax Syntax overview
Shells like \c fish are used by giving them commands. Every \c fish command follows the same simple syntax.
Shells like \c fish are used by giving them commands. Every \c fish
command follows the same simple syntax.
A command is executed by writing the name of the command followed by any arguments.
A command is executed by writing the name of the command followed by
any arguments.
Example:
@ -264,6 +266,8 @@ in the known_hosts file. (see the ssh documentation for more information)
- The 'su' command complete using all users on the system
- The \c apt-get, \c rpm and \c tym commands complete using all installed packages.
\subsection completion-own Writing your own completions
Specifying your own completions is not complicated. To specify a
completion, one simply uses the \c complete command. \c complete takes
as a parameter the name of the command to specify a completion
@ -342,7 +346,8 @@ parameter.
Example:
The command <code>echo (basename image.jpg .jpg).png</code> will output 'image.png'.
The command <code>echo (basename image.jpg .jpg).png</code> will
output 'image.png'.
The command <tt>for i in *.jpg; convert $i (basename $i .jpg).png;
end</tt> will convert all Jpeg files in the current directory to the