Hi,
I noticed that pr interprets +0 as a file name and not as +FIRST_PAGE.
And so a "no such file" error is shown whereas --pages=0 shows an
"invalid page range" error.
$ echo "foo" > foo
$ pr +0 foo
pr: +0: No such file or directory
[snipped pr output of the "foo" file]
$ pr --pages=0 foo
pr: invalid page range ‘0’
I'm using coreutils 9.11.
+... could be a file name, so we treat +<invalid page> as a file
since: https://github.com/coreutils/coreutils/commit/48eaa7382
--pages=0 is diagnosed directly as an invalid range
as there can be no ambiguity there.
So the inconsistency is due to a feature,
allowing users to `pr +foo --option` for example.
Adjusting this now could introduce some breakage,
and I don't see much benefit to changing this.
Oh this is probably coming from uutils
partially supporting the fallback.
It would be good to give that context when reporting bugs.
I've pushed the attached test to the GNU test suite,
to verify this handling.
Marking this as done.
thanks,
Padraig