mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Make the . builtin have a more useful (and posix-compatible) exit status
darcs-hash:20071005145808-75c98-17100c1e321b8bca06f75e900db1386451232f98.gz
This commit is contained in:
parent
d34d05ca8b
commit
713c84d821
|
@ -2832,6 +2832,10 @@ static int builtin_source( wchar_t ** argv )
|
|||
argv[0],
|
||||
fn_intern == L"-" ? L"<stdin>" : fn_intern );
|
||||
}
|
||||
else
|
||||
{
|
||||
res = proc_get_last_status();
|
||||
}
|
||||
|
||||
/*
|
||||
Do not close fd after calling reader_read. reader_read
|
||||
|
|
|
@ -16,6 +16,10 @@ variable.
|
|||
If no file is specified, or if the file name '-' is used, stdin will
|
||||
be read.
|
||||
|
||||
The return status of . is the return status of the last job to
|
||||
execute. If something goes wrong while opening or reading the file,
|
||||
. exits with a non-zero status.
|
||||
|
||||
\subsection source-example Example
|
||||
|
||||
<tt>. ~/.fish</tt>
|
||||
|
|
Loading…
Reference in New Issue
Block a user