bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort --key-debug


From: James Youngman
Subject: Re: sort --key-debug
Date: Fri, 12 Jun 2009 19:42:02 +0100

On Fri, Jun 12, 2009 at 7:35 PM, Jim Meyering<address@hidden> wrote:
> Pádraig Brady wrote:
>> I find it quite difficult to determine correct key positions to use,
>> especially given the complicated rules for (global) -b options etc.
>>
>> I wonder would it be useful to add a --key-debug option,
>> which would mark in the output the keys used.
>>
>> For multibyte locales you could use: ⌜key1⌟ blah blah⌜ key2⌟
>> or for single byte locales:          «key1» blah blah« key2»
>> or for ascii:                        (key1) blah blah( key2)
>>
>> It might mean that users would not have to reference the
>> detailed documentation as much. Note the above markings don't
>
> Yes!
> Such an option definitely would have saved me a lot of time over the
> years.

Without wishing to massively overcomplicate things, another
alternative way to visualise things is to have an option which makes
sort output only the key data - kind of like "grep --only-matching".
I don't have a preference between the options other than to comment
that while your original suggestion has the issue that some data may
contain ( or » or something like that, it also has the benefit that
people would be less likely to rely on a specific output format in
scripts, leaving us free to tweak the format for best usability.

James.




reply via email to

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