diff --git a/share/functions/seq.fish b/share/functions/seq.fish index 316605e9a..74104b81b 100644 --- a/share/functions/seq.fish +++ b/share/functions/seq.fish @@ -1,4 +1,4 @@ -# If seq is not installed, then define a function that invokes __fish_fallback_seq + # If seq is not installed, then define a function that invokes __fish_fallback_seq # We can't call type here because that also calls seq if not command -sq seq @@ -33,7 +33,7 @@ if not command -sq seq end for i in $from $step $to - if not echo $i | grep -E '^-?[0-9]*([0-9]*|\.[0-9]+)$' >/dev/null + if not string match -rq '^-?[0-9]*([0-9]*|\.[0-9]+)$' $i printf (_ "%s: '%s' is not a number\n") seq $i return 1 end