GNU bug report logs -
#47243
pr lacks -p
Previous Next
Full log
View this message in rfc822 format
On 28/07/2025 11:22, Pádraig Brady wrote:
> On 28/07/2025 03:21, Collin Funk wrote:
>> Hi Paul,
>>
>> Paul Eggert <eggert <at> cs.ucla.edu> writes:
>>
>>> Thanks for looking into that. Unfortunately POSIX says -p should be
>>> ignored only if standard output is a terminal, and that newline should
>>> be read from /dev/tty, not from standard input. This is so that users
>>> can pipe into 'pr -p'. So the proposed patch needs some changes. Here
>>> are the issues I found:
>>
>> Thanks for the thorough review.
>>
>> I think that v3 attached should cover everything.
>>
>> Collin
>>
>
> write_error() manipulates stdout,
> so for the putc(..., stderr) I'd just do a straight error(EXIT_FAILURE, ....)
>
> The NEWS would be best in a "New Features" section.
>
> thanks!
> Padraig
Reading POSIX more closely I see there is also pause logic for the first page only:
-f [XSI] [Option Start] Use a <form-feed> for new pages, instead of the default behavior that uses a sequence of <newline> characters.
Pause before beginning the first page if the standard output is associated with a terminal. [Option End]
This bug report was last modified 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.