mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
parent
4ccdd7bdcf
commit
b13f022708
@ -42,11 +42,15 @@ function __bobthefish_pretty_ms -S -a ms interval -d 'Millisecond formatting for
|
|||||||
end
|
end
|
||||||
|
|
||||||
switch $FISH_VERSION
|
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.\*
|
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
|
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
|
math -s$scale "$ms/$interval_ms" | string replace -r '\\.?0*$' $interval
|
||||||
|
case \*
|
||||||
|
math -s$scale "$ms/$interval_ms"
|
||||||
|
echo -ns $interval
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user