diff options
author | waterhouse <johnthescavenger@gmail.com> | 2014-02-16 01:17:12 -0800 |
---|---|---|
committer | John Boyle <johnthescavenger+github@gmail.com> | 2014-02-16 01:17:12 -0800 |
commit | b1545c5ce244dadcd6de5c09f7b90b11215bb6cd (patch) | |
tree | 0c13e187ec9fb166fa70d1cd69f8fe7c98b30e49 /share | |
parent | de8bae3f0f5ac32c4599009bb3260cea80653e9c (diff) |
'seq' should return 1, not exit 1, on bad arglist
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/seq.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/seq.fish b/share/functions/seq.fish index f710c235..0f5f8534 100644 --- a/share/functions/seq.fish +++ b/share/functions/seq.fish @@ -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 |