|
From: | Eric Blake |
Subject: | bug#7157: df should default to -P if output is not a tty |
Date: | Mon, 04 Oct 2010 09:06:39 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4 |
[please keep the list in the loop] On 10/04/2010 08:54 AM, Alain Knaff wrote:
One thing that might be possible, however, is to improve df output to adjust column alignment if $COLUMNSRather than using $COLUMNS (which is not set by all shells...), it might be preferable to do an ioctl(1, TIOCGWINSZ, ...) instead. Indeed, the ioctl returns the window size as it is now (even if it has been resized). That is what ls does, in any case.
Yep, for consistency among coreutils, the ioctl approach is definitely best.
is not set (or is set to something large), so as to avoid breaking lines in the case where the output is usable in a long-line context. But this still doesn't help the case that logwatch should have been using -P in the first place.Agreed. I now also reported the problem to Kirk Bauer from logwatch.
Glad to hear it. -- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |