aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/eval.fish
diff options
context:
space:
mode:
authorGravatar Dylan Smith <dylan.ah.smith@gmail.com>2010-11-22 19:36:42 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-11-22 19:36:42 +0800
commit6b243fbcd35f57633066d6d948845d8ad7818239 (patch)
tree692ecb65832d185584bd27083bc69d5e8aa2b5c2 /share/functions/eval.fish
parent82f8c3834ee9fef74ab89a562eea3a22dcaf0d81 (diff)
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>
Diffstat (limited to 'share/functions/eval.fish')
-rw-r--r--share/functions/eval.fish2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/functions/eval.fish b/share/functions/eval.fish
index 34c4e3aa..aec8de27 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