|
|
|
@ -42,11 +42,15 @@ function __bobthefish_pretty_ms -S -a ms interval -d 'Millisecond formatting for
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
switch $FISH_VERSION
|
|
|
|
|
# Fish 2.3 and lower doesn't know about the -s argument to math.
|
|
|
|
|
case 2.0.\* 2.1.\* 2.2.\* 2.3.\*
|
|
|
|
|
# Fish 2.3 and lower doesn't know about the -s argument to math.
|
|
|
|
|
math "scale=$scale;$ms/$interval_ms" | string replace -r '\\.?0*$' $interval
|
|
|
|
|
case \*
|
|
|
|
|
case 2.\*
|
|
|
|
|
# Fish 2.x always returned a float when given the -s argument.
|
|
|
|
|
math -s$scale "$ms/$interval_ms" | string replace -r '\\.?0*$' $interval
|
|
|
|
|
case \*
|
|
|
|
|
math -s$scale "$ms/$interval_ms"
|
|
|
|
|
echo -ns $interval
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|