mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-12 16:07:33 +00:00
1b71f91a01
darcs-hash:20061117162438-ac50b-5c4c7f0bd8bf53a16e16ecfead9569e642b7160f.gz
21 lines
299 B
Fish
21 lines
299 B
Fish
|
|
function math -d (N_ "Perform math calculations in bc")
|
|
if count $argv >/dev/null
|
|
switch $argv[1]
|
|
case -h --h --he --hel --help
|
|
__fish_print_help math
|
|
return 0
|
|
end
|
|
|
|
set -l out (echo $argv|bc)
|
|
echo $out
|
|
switch $out
|
|
case 0
|
|
return 1
|
|
end
|
|
return 0
|
|
end
|
|
return 2
|
|
|
|
end
|
|
|