'seq' should return 1, not exit 1, on bad arglist

This commit is contained in:
waterhouse 2014-02-16 01:17:12 -08:00 committed by John Boyle
parent de8bae3f0f
commit b1545c5ce2

View file

@ -29,14 +29,14 @@ if begin ; not test -x /usr/bin/seq ; and not type -f seq > /dev/null; end
case '*'
printf (_ "%s: Expected 1, 2 or 3 arguments, got %d\n") seq (count $argv)
exit 1
return 1
end
for i in $from $step $to
if not echo $i | grep -E '^-?[0-9]*([0-9]*|\.[0-9]+)$' >/dev/null
printf (_ "%s: '%s' is not a number\n") seq $i
exit 1
return 1
end
end