mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 12:51:12 -03:00
Make the . builtin have a more useful (and posix-compatible) exit status
darcs-hash:20071005145808-75c98-17100c1e321b8bca06f75e900db1386451232f98.gz
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user