The begin builtin should not alter the exit status

darcs-hash:20060712173141-ac50b-8d21f9f22ef55581521ccf923411e3458bd8109c.gz
This commit is contained in:
axel 2006-07-13 03:31:41 +10:00
parent 9e304fa734
commit 036cc4e0fa
3 changed files with 4 additions and 2 deletions

View File

@ -2476,7 +2476,7 @@ static int builtin_begin( wchar_t **argv )
{
parser_push_block( BEGIN );
current_block->tok_pos = parser_get_pos();
return 0;
return proc_get_last_status();
}

View File

@ -13,6 +13,8 @@ into a block. The reason for this is usually either to introduce a new
variable scope or to redirect the input to output of this set of
commands as a group.
The \c begin command does not change the current exit status.
\subsection begin-example Example
The following code sets a number of variables inside of a block

View File

@ -13,4 +13,4 @@ begin; [COMMANDS...] end
documentation for the block constructs, such as \c if, \c for and \
while.
The end command does not change the current exit status.
The \c end command does not change the current exit status.