mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-08 13:09:45 +08:00
math: Avoid calling env
This commit is contained in:
parent
f086bc9564
commit
2334374fd6
|
@ -7,7 +7,8 @@ function math --description "Perform math calculations in bc"
|
||||||
return 0
|
return 0
|
||||||
end
|
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
|
test -z "$out"; and return 1
|
||||||
echo $out
|
echo $out
|
||||||
switch $out
|
switch $out
|
||||||
|
|
Loading…
Reference in New Issue
Block a user