mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-02 19:21:15 -03:00
slog through documentation
I did.. a and b today.
This commit is contained in:
@@ -6,10 +6,7 @@ begin - start a new block of code
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
begin; [COMMANDS...;] end
|
||||
|
||||
``begin``; [*COMMANDS* ...]; ``end``
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -22,14 +19,11 @@ The block is unconditionally executed. ``begin; ...; end`` is equivalent to ``if
|
||||
|
||||
``begin`` does not change the current exit status itself. After the block has completed, ``$status`` will be set to the status returned by the most recent command.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following code sets a number of variables inside of a block scope. Since the variables are set inside the block and have local scope, they will be automatically deleted when the block ends.
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
begin
|
||||
@@ -45,8 +39,6 @@ The following code sets a number of variables inside of a block scope. Since the
|
||||
|
||||
In the following code, all output is redirected to the file out.html.
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
begin
|
||||
@@ -57,4 +49,3 @@ In the following code, all output is redirected to the file out.html.
|
||||
end
|
||||
...
|
||||
end > out.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user