[wellylug] Man-page formatting

michael at diaspora.gen.nz michael at diaspora.gen.nz
Fri Jul 1 10:13:46 NZST 2005


Ewen McNeill writes:
>In message <1120127757.4408.49.camel at localhost>, Grant McLean writes:
>>I've definitely confirmed that exactly the symptoms I described occur on
>>both woody and sarge.  In fact I tested it before sending my message.
>>[...]
>>I have noticed that it seems to make a difference whether less is
>>reading from a file or a pipe that's blocked.
>
>How very interesting, so it does.  If a simple "less FILE" is running,
>then COLUMNS is updated by the next bash prompt.  But if a file is piped
>into less, then it isn't.  This is true even if the pipeline isn't
>blocked (except by less pausing), such as "cat FILE | less", or even if
>the process isn't actually using the pipe, such as "cat /dev/zero | less
>FILE".  (In that latter situation less displays the file.)

I can't reproduce this on one of my two systems (Ubuntu Breezy):

    ii  bash           3.0-14         The GNU Bourne Again SHell
    ii  xterm          6.8.2-10       X terminal emulator

The procedure I use is as follows:

    1. cat /dev/null | less NOTES
    2. Resize window smaller
    3. Press 'q' to exit less.
    4. echo $COLUMNS -- notice same as resized window value.
    5. cat /dev/null | less NOTES
    6. Resize window larger.
    7. Press '^Z' to suspend less.
    8. echo $COLUMNS -- notice same as resized window value.

The version of bash is admittedly very different to that in Sarge --
2.05 compared to 3.00.

The same procedure through Putty to a Redhat 7.3 system running bash
2.05.8 does show the bug, however.  So I suspect it may have been fixed
in the next revision of bash.
    -- michael.




More information about the wellylug mailing list