Stomp exit status of initialization scripts so that fish starts out with $status 0

https://github.com/fish-shell/fish-shell/issues/635
This commit is contained in:
ridiculousfish 2013-04-09 23:48:03 -07:00
parent e1734468f5
commit 73046ec838
2 changed files with 5 additions and 2 deletions

View file

@ -28,8 +28,8 @@ if status --is-login
# Put linux consoles in unicode mode.
#
if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
if test "$TERM" = linux
if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
if which unicode_start >/dev/null
unicode_start
end

View file

@ -460,6 +460,9 @@ int main(int argc, char **argv)
const io_chain_t empty_ios;
if (read_init(paths))
{
/* Stop the exit status of any initialization commands (#635) */
proc_set_last_status(STATUS_BUILTIN_OK);
/* Run the commands specified as arguments, if any */
if (! cmds.empty())
{