mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
'seq' should return 1, not exit 1, on bad arglist
This commit is contained in:
parent
de8bae3f0f
commit
b1545c5ce2
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue