What should Python apps do when asked to show help?

cs at zip.com.au cs at zip.com.au
Sun May 1 03:28:53 EDT 2016


On 01May2016 16:44, Chris Angelico <rosuav at gmail.com> wrote:
>On Sun, May 1, 2016 at 3:24 PM,  <cs at zip.com.au> wrote:
>> Yes, PAGER=cat would make "man" also not page, and likely almost everything.
>> And yet I am unwilling to do so. Why?
>>
>> On reflection, my personal problems with this approach are twofold:
>>
>> - I want $PAGER to specify my preferred pager when I do want a pager, so
>> setting it to "cat" does not inform apps about my wishes
>
>So you expect the environment variable to say which of multiple pagers
>you might want, but only when you already want a pager. Okay. How is
>an app supposed to know whether or not to use a pager? How do you
>expect them to mindread?

I think for several of us, we do not expect the app to mindread. Don't page for 
short output!

As the rest of my article remarks, I at least think "man" should page on the 
premise than manual pages will be long enough to benefit, as they should be.

Aside: especially if one uses "less" and includes the -d and -F options in the 
$LESS envvar, which suppresses the warning about "dumb" terminals and autoquits 
if the file fits on the screen - these two provide most of the painfree 
behaviour for short outputs and embedded ttys at least.

We could fork a separate discussion on making pagers more seamless, and 
terminal emulators with nice modes to reduce the need for pagers.

Cheers,
Cameron Simpson <cs at zip.com.au>



More information about the Python-list mailing list