Hi Pádraig,

Pádraig Brady <p...@draigbrady.com> writes:

>>> Given that hardly anybody uses pr any more, I'm surprised that the
>>> Austin Group still cares about its options. It's an obsolete utility,
>>> and ought to be deprecated.
>> True, but this option seems simple enough to implement.
>> How about the attached patch?
>
> I would just ignore the -p if stdin/stdout are not a tty.
> That would make a test easier anyway, to ensure
> `pr -p file >/dev/null` passes.

Thanks for the input.

I was conflicted on whether the best behavior was to warn, error, or
ignore the option in those cases. And whether it should be ignored if
standard out was not a tty. I guess it would be pointless to do, for
example, 'pr -p ChangeLog < file-full-of-newlines'.

I have attached the V2 patch which adds the additional check for
'isatty (STDIN_FILENO)' (V1 only had it for STDERR_FILENO), documents
that behavior, and adds a NEWS entry.

I'll push tomorrow to give others some time to comment.

Collin



Reply via email to