[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Output badformat of "df -h" & "df -T"

From: Jim Meyering
Subject: Re: Output badformat of "df -h" & "df -T"
Date: Wed, 14 Jan 2009 12:30:39 +0100

Andreas Schwab <address@hidden> wrote:
> Pádraig Brady <address@hidden> writes:
>> Ok, but it would be nice not to have wildly differing output
>> on the same system, depending on what devices are attached.
>> This "feature" is only to aid human parsing so should be
>> restricted to ttys IMHO.
> Keying that on isatty is not a good way, since that would change the
> output depending on whether you pipe it through a pager, for example.

Hi Pádraig,

This has been part of coreutils' policy from the very beginning:

    Avoid adding features that allow anything other than stdin and argv
    (e.g., envvars, and especially isatty) to change a tool's behavior.

    [Yes, I'll add something like the above to HACKING ;-)

Most of the exceptions are due to POSIX or legacy-interop. requirements,
and they make it harder to test the affected code.

One particularly irksome case is at the core of remove.c.  In order to
be able to test it without relying on expect-like tools, I reluctantly
added rm's ---presume-input-tty option.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]