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 <chaos.proton@gmail.com>
This commit is contained in:
Dylan Smith 2010-11-22 19:36:42 +08:00 committed by Grissiom
parent 82f8c3834e
commit 6b243fbcd3

View File

@ -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