From 6b243fbcd35f57633066d6d948845d8ad7818239 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Mon, 22 Nov 2010 19:36:42 +0800 Subject: [PATCH] eval: (eval false) should return an error status This also caused (isatty < /dev/null) to return 0 since it uses eval, and (ls | cat) to output using the classify indicator style since it uses isatty. This is how I found the bug. Reviewed-by: Grissiom --- share/functions/eval.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/functions/eval.fish b/share/functions/eval.fish index 34c4e3aa3..aec8de27a 100644 --- a/share/functions/eval.fish +++ b/share/functions/eval.fish @@ -21,6 +21,8 @@ function eval -S -d "Evaluate parameters as a command" end echo begin\; $argv \;end eval2_inner \<\&3 3\<\&- | . 3<&0 + set -l res $status status --job-control $mode + return $res end