From 309dfeb6a8b1244627acf4d8060593396b2a3946 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 6 Jan 2013 15:19:37 -0800 Subject: [PATCH] Wrong sense for is_interactive_session check Fixes https://github.com/fish-shell/fish-shell/issues/499 --- fish.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish.cpp b/fish.cpp index 86568d727..3d7c749e1 100644 --- a/fish.cpp +++ b/fish.cpp @@ -370,7 +370,7 @@ static int fish_parse_opt(int argc, char **argv, std::vector *out_c We are an interactive session if we have not been given an explicit command to execute, _and_ stdin is a tty. */ - is_interactive_session &= has_cmd; + is_interactive_session &= ! has_cmd; is_interactive_session &= (my_optind == argc); is_interactive_session &= isatty(STDIN_FILENO);