diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 27dce7c..d44114e 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -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