[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50940: how df utility displays sizes - GB vs GiB
From: |
Glenn Golden |
Subject: |
bug#50940: how df utility displays sizes - GB vs GiB |
Date: |
Fri, 1 Oct 2021 15:16:24 -0600 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Paul Eggert <eggert@cs.ucla.edu> [2021-10-01 14:01:14 -0700]:
>
> On 10/1/21 1:30 PM, Danie de Jager wrote:
> > Can we use the same options, but to trigger the longer annotation, we
> > double the characters used to -hh and -HH?
>
> Interesting idea. Normally, later options override earlier, so 'df -h -H' is
> equivalent to 'df -H'. This is so that one can alias 'df' to 'df -h' and
> then type plain 'df' to get the same behavior as 'df -h', while being able
> to type 'df -H' to get the other behavior. With that in mind if we made the
> change you suggest, such an alias would mean that if you typed 'df' you
> would get the behavior of ordinary 'df -h' while if you typed 'df -h' you'd
> get the behavior of ordinary 'df -hh'. So there might be an opportunity for
> confusion there.
>
> We could of course use a different option letter (unfortunately -B is
> already taken...).
>
Might it be possible to finesse the already existing envars (BLOCK_SIZE,
DF_BLOCK_SIZE, etc.) to accomplish the desired suffixing mods? Or perhaps
even a new envar(s) dedicated to simply specifying the suffixing, and
defaulting to present behavior for backcompat...?
Haven't thought this thru, just tossing it out as a possibility to think on.
Might be cleaner in some respects than trying to wedge it into the options.
bug#50940: how df utility displays sizes - GB vs GiB, Paul Eggert, 2021/10/01