begin; ...; end is equivalent
+to if true; ...; end. The begin command is used to group any
+number of commands into a block. The reason for doing so is usually
+either to introduce a new variable scope, to redirect the input or
+output of a set of commands as a group, or to specify precedence when
+using the conditional commands like \c and.
The \c begin command does not change the current exit status.
@@ -30,3 +31,17 @@ end
# the block and was killed
echo $PIRATE
+
+In the following code, all output is redirected to the file out.html.
+
+
+begin
+ echo $xml_header
+ echo $html_header
+ if test -e $file
+ ...
+ end
+ ...
+
+end > out.html
+
diff --git a/doc_src/end.txt b/doc_src/end.txt
index 3b61e9d35..4e891fb3f 100644
--- a/doc_src/end.txt
+++ b/doc_src/end.txt
@@ -10,7 +10,7 @@ begin; [COMMANDS...] end
\subsection end-description Description
end ends a block of commands. For more information, read the
-documentation for the block constructs, such as \c if, \c for and \
+documentation for the block constructs, such as \c if, \c for and \c
while.
The \c end command does not change the current exit status.
diff --git a/doc_src/function.txt b/doc_src/function.txt
index 62dd41e0a..51225f55e 100644
--- a/doc_src/function.txt
+++ b/doc_src/function.txt
@@ -12,7 +12,7 @@
- -s
or --on-signal SIGSPEC
tells fish to run this function when the signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the signal name, such as SIGHUP (or just HUP)
- -v
or --on-variable VARIABLE_NAME
tells fish to run this function when the variable VARIABLE_NAME changes value
-This builtin command is used to create a new function. A Function is a
+This builtin command is used to create a new function. A function is a
list of commands that will be executed when the name of the function
is entered. The function
@@ -25,7 +25,7 @@ end
will write hello
whenever the user enters \c hi.
If the user enters any additional arguments after the function, they
-are inserted into the environment variable array argv.
+are inserted into the environment variable array argv.
\subsection function-example Example