From 4e602d98d715f47dca43ebe2615a8862c0bad145 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sun, 1 Oct 2017 18:30:30 -0700 Subject: [PATCH] Fix fish < 2.4 command duration regression For real this time Fixes #107 --- fish_right_prompt.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index fecaae0..524e887 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -39,7 +39,8 @@ function __bobthefish_pretty_ms -S -a ms interval -d 'Millisecond formatting for end switch $FISH_VERSION - case 2.\* + # Fish 2.3 and lower doesn't know about the -s argument to math. + case 2.0.\* 2.1.\* 2.2.\* 2.3.\* math "scale=$scale;$ms/$interval_ms" | string replace -r '\\.?0*$' $interval case \* math -s$scale "$ms/$interval_ms" | string replace -r '\\.?0*$' $interval