diff options
author | 2015-09-27 12:49:57 +0200 | |
---|---|---|
committer | 2015-09-27 12:51:24 +0200 | |
commit | 2334374fd6014cb38d3829d37ac9f543e24e9e6c (patch) | |
tree | 2591e8f76a1cdb17850852a83e7dc4d16d401b0a /share/functions/math.fish | |
parent | f086bc95647212287415bc847fd519f484f494ff (diff) |
math: Avoid calling `env`
Diffstat (limited to 'share/functions/math.fish')
-rw-r--r-- | share/functions/math.fish | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/functions/math.fish b/share/functions/math.fish index b4f93e79..d80a8c7f 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|env BC_LINE_LENGTH=0 bc) + set -lx BC_LINE_LENGTH 0 + set -l out (echo $argv | bc) test -z "$out"; and return 1 echo $out switch $out |