Permalink
Browse files

Stomp exit status of initialization scripts so that fish starts out w…

…ith $status 0

#635
  • Loading branch information...
ridiculousfish committed Apr 10, 2013
1 parent e173446 commit 73046ec838ca90cbf7e1ea1b1ac89f5c44eec52d
Showing with 5 additions and 2 deletions.
  1. +2 −2 etc/config.fish
  2. +3 −0 fish.cpp
View
@@ -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 test "$TERM" = linux
+ if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
if which unicode_start >/dev/null
unicode_start
end
View
@@ -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())
{

0 comments on commit 73046ec

Please sign in to comment.