Page MenuHomeFreeBSD

jot.1: Explain default argument values more precisely
ClosedPublic

Authored by 0mp on Sep 21 2019, 2:47 PM.
Tags
None
Referenced Files
F168038892: D21736.id62380.diff
Wed, Aug 26, 1:55 AM
F168007831: D21736.id.diff
Tue, Aug 25, 9:32 PM
Unknown Object (File)
Tue, Aug 25, 1:01 PM
Unknown Object (File)
Sat, Aug 22, 4:47 PM
Unknown Object (File)
Mon, Aug 10, 4:26 PM
Unknown Object (File)
Mon, Aug 10, 4:26 PM
Unknown Object (File)
Mon, Aug 10, 4:26 PM
Unknown Object (File)
Mon, Aug 10, 4:26 PM
Subscribers

Details

Summary
jot.1: Explain default argument values more precisely


The way jot(1) defaults missing arguments doesn't match the behaviour described
in the manpage, which states that with fewer than 3 arguments missing values
are supplied from left to right.

In fact, with one or two arguments, the last (s which is step size or seed)
defaults to 1 (or -1 if begin and end specify a descending range), and then
omitted arguments are set to default starting with the leftmost until three
arguments are available.

This is why `jot 2 1000` prints 1000 and 1001 instead of 1000 and 100.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=135475

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26598
Build 24981: arc lint + arc unit