aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-10-09 11:21:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-10-09 11:21:02 +1000
commita074cd62bccf9a163d970d77d0c3ba86166045de (patch)
tree31072cfb44e432d4641e0fb4c87671f299425cd5 /doc_src
parent7a8b46816556339059878cf62dbe142552de953a (diff)
Be more rigorous with the exit codes set by the parser and builtins
darcs-hash:20061009012102-ac50b-4f28c43dd1ccdcc04d1620a6da05218a99fd7337.gz
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/doc.hdr22
1 files changed, 21 insertions, 1 deletions
diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr
index ef2e37d1..98f5c40c 100644
--- a/doc_src/doc.hdr
+++ b/doc_src/doc.hdr
@@ -790,7 +790,7 @@ values of most of these variables.
- \c history, which is an array containing the last commands that where entered.
- \c HOME, which is the users home directory. This variable can only be changed by the root user.
- \c PWD, which is the current working directory.
-- \c status, which is the exit status of the last foreground job to exit. If a job contains pipelines, the status of the last command in the pipeline is the status for the job.
+- \c status, which is the exit status of the last foreground job to exit.
- \c USER, which is the username. This variable can only be changed by the root user.
Variables whose name are in uppercase are exported to the commands
@@ -800,6 +800,26 @@ distinguish between exported and unexported variables. \c fish also
uses several variables internally. Such variables are prefixed with
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.
+
+Fish stores the exit status of the last process in the last job to
+exit in the \c status variable.
+
+If fish encounters a problem while executing a command, the status
+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
+
\subsection variables-color Variables for changing highlighting colors
The colors used by fish for syntax highlighting can be configured by