Do not change status when the 'exit' builtin is called with no argument

darcs-hash:20060612165137-ac50b-0281941e35c5f8b619460f67d24a89caec475815.gz
This commit is contained in:
axel 2006-06-13 02:51:37 +10:00
parent f46145a6b3
commit 2e5821c17d
2 changed files with 2 additions and 1 deletions

View file

@ -1903,6 +1903,7 @@ static int builtin_exit( wchar_t **argv )
{
case 1:
{
ec = proc_get_last_status();
break;
}

View file

@ -7,7 +7,7 @@
The <tt>exit</tt> builtin causes fish to exit. If <tt>STATUS</tt> is
supplied, it will be converted to an integer and used as the exit
code. Otherwise the exit code will be 0.
code. Otherwise the exit code will be that of the last command executed.
If exit is called while sourcing a file (using the <a
href="#source">.</a> builtin) the rest of the file will be skipped,