diff --git a/doc_src/and.txt b/doc_src/and.txt index 8069f2b07..bf75170e9 100644 --- a/doc_src/and.txt +++ b/doc_src/and.txt @@ -10,6 +10,10 @@ status (as set by the last previous command) is 0. The and command does not change the current exit status. +The exit status of the last foreground command to exit can always be +accessed using the $status +variable. + \subsection and-example Example The following code runs the \c make command to build a program, if the diff --git a/doc_src/if.txt b/doc_src/if.txt index 32a1bc3d1..f12380021 100644 --- a/doc_src/if.txt +++ b/doc_src/if.txt @@ -4,11 +4,16 @@ if CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end \subsection if-description Description + if will execute the command CONDITION. If the condition's exit status is 0, the commands COMMANDS_TRUE will execute. If it is not 0 and else is given, COMMANDS_FALSE will be executed. Hint: use begin; ...; end for complex conditions. +The exit status of the last foreground command to exit can always be +accessed using the $status +variable. + \subsection if-example Example
diff --git a/doc_src/index.hdr b/doc_src/index.hdr index 8f3c9a1cf..643c41fcc 100644 --- a/doc_src/index.hdr +++ b/doc_src/index.hdr @@ -812,11 +812,11 @@ the string __FISH or __fish. These should be ignored by the user. \subsection variables-status The status variable Whenever a process exits, an exit status is returned to the program -that started it. This exit status is an integer number, which tells -the calling application how the execution of the command went. In -general, a zero exit status means that the command executed without -problem, but a non-zero exit status means there was some form of -problem. +that started it (usually the shell). This exit status is an integer +number, which tells the calling application how the execution of the +command went. In general, a zero exit status means that the command +executed without problem, but a non-zero exit status means there was +some form of problem. Fish stores the exit status of the last process in the last job to exit in the \c status variable. @@ -827,7 +827,7 @@ variable may also be set to a specific value: - 1 is the generally the exit status from fish builtins if they where supplied with invalid arguments - 125 means an unknown error occured while trying to execute the command - 126 means that the command was not executed because none of the wildcards in the command produced any matches -- 127 means that no command with the given name could be located +- 127 means that no function, builtin or command with the given name could be located \subsection variables-color Variables for changing highlighting colors @@ -893,61 +893,10 @@ code duplication, and to avoid the confusion of subtly differing versions of the same command, \c fish only implements builtins for actions which cannot be performed by a regular command. -\section bundle Commands bundled with fish - -The following commands are distributed with fish. Many of them are -builtins or shellscript functions, and can only be used inside fish. - -- ., read and execute the commands in a file -- and, execute command if previous command suceeded -- bg, set a command to the background -- begin, execute a block of commands -- bind, change keyboard bindings -- break, stop the execution of a loop -- block, Temporarily block delivery of events -- builtin, execute a builtin command -- case, conditionally execute a block of commands -- cd, change the current directory -- command, execute an external program -- commandline, set or get the contents of the commandline buffer -- complete, add and remove completions -- continue, skip the rest of the current lap of a loop -- count, count the number of arguments -- dirh, view the directory history -- dirs, view the directory stack -- end, end a block of commands -- else, conditionally execute a block of commands -- eval, evaluate a string as a command -- exec, replace the current process image with a new command -- exit, causes \c fish to quit -- fg, set a command to the foreground -- fishd, the universal variable daemon -- for, perform a block of commands once for every element in a list -- function, define a new function -- functions, print or erase functions -- help, show the fish documentation -- if, conditionally execute a block of commands -- jobs, print the currently running jobs -- mimedb, view mimedata about a file -- nextd, move forward in the directory history -- not, negates the exit status of any command -- or, execute a command if previous command failed -- popd, move to the topmost directory on the directory stack -- prevd, move backwards in the direcotry stack -- pushd, push the surrent directory onto the directory stack -- random, calculate a pseudo-random number -- return, return from a function -- read, read from a stream into an environment variable -- set, set environment variables -- set_color, change the terminal colors -- switch, conditionally execute a block of commands -- tokenize, split a string up into multiple tokens -- ulimit, set or get the shells resurce usage limits -- umask, set or get the file creation mask -- while, perform a block of commands while a condition is met - -For more information about these commands, use the--help-option of the command to display a longer explanation. +For a list of all builtins, functions and commands shipped with fish, +see the table of contents. The +documentation is also available by using the--help+switch of the command. \section editor Command Line editor @@ -1308,7 +1257,7 @@ g++, javac, java, gcj, lpr, doxygen, whois, find) - Check keybinding commands for output - if nothing has happened, don't repaint to reduce flicker - wait shellscript - Support for the screen clipboard - +- Files begining with '-' should not be colored red if a '--' argument has been given \subsection todo-possible Possible features @@ -1344,18 +1293,20 @@ g++, javac, java, gcj, lpr, doxygen, whois, find) - Try to remove more malloc calls to reduce memory usage. The time_t arrays used by the autoloader sound like a good candidate. - The code validator should warn about unknown commands. - The large number of interned strings means that autounloading frees less memory than it should. Completion strings should probably be either refcounted or not shared at all. +- Auto-newlines - -\subsection bugs Known bugs +\subsection bugs Known bugs and issues - Completion for gcc -\#\#\# option doesn't work. - Suspending and then resuming pipelines containing a builtin is broken. How should this be handled? - screen handling code can't handle tabs in input. - +- The completion pager doesn't work if stderr is redirected. +- Can't complete directories as commands unless there is a slash +- ls should use dircolors +- Doxygen called when it shouldn't? If you think you have found a bug not described here, please send a -report to axel@liljencrantz.se -. +report to fish-users@lists.sf.net. \subsection issues Known issues diff --git a/doc_src/or.txt b/doc_src/or.txt index 96f504510..6227170ac 100644 --- a/doc_src/or.txt +++ b/doc_src/or.txt @@ -10,6 +10,10 @@ status (as set by the last previous command) is not 0. The or command does not change the current exit status. +The exit status of the last foreground command to exit can always be +accessed using the $status +variable. + \subsection or-example Example The following code runs the \c make command to build a program, if the