aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/math.fish
blob: d28087fafb5136b66d03bb8da119999a273298a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

function math -d (N_ "Perform math calculations in bc")
	if count $argv >/dev/null
		set -l out (echo $argv|bc)
		echo $out
		switch $out
			case 0
				return 1
		end
		return 0
	end
	return 2
	
end