aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/math.fish
diff options
context:
space:
mode:
Diffstat (limited to 'share/functions/math.fish')
-rw-r--r--share/functions/math.fish3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/functions/math.fish b/share/functions/math.fish
index bad349d9..ced85aad 100644
--- a/share/functions/math.fish
+++ b/share/functions/math.fish
@@ -7,7 +7,8 @@ function math --description "Perform math calculations in bc"
return 0
end
- set -l out (echo $argv|bc)
+ set -l out (echo $argv|env BC_LINE_LENGTH=0 bc)
+ test -z "$out"; and return 1
echo $out
switch $out
case 0