Pádraig Brady wrote, On 10/07/2010 06:22 AM:
> On 07/10/10 01:03, Pádraig Brady wrote:
>> On 06/10/10 21:41, Assaf Gordon wrote:
>>>
>>> The "--auto-format" feature simply builds the "-o" format line 
>>> automatically, based on the number of columns from both input files.
>>
>> Thanks for persisting with this and presenting a concise example.
>> I agree that this is useful and can't think of a simple workaround.
>> Perhaps the interface would be better as:
>>
>> -o {all (default), padded, FORMAT}
>>
>> where padded is the functionality you're suggesting?
> 
> Thinking more about it, we mightn't need any new options at all.
> Currently -e is redundant if -o is not specified.
> So how about changing that so that if -e is specified
> we operate as above by auto inserting empty fields?
> Also I wouldn't base on the number of fields in the first line,
> instead auto padding to the biggest number of fields
> on the current lines under consideration.

My concern is the principle of "least surprise" - if there are existing 
scripts/programs that specify "-e" without "-o" (doesn't make sense, but still 
possible) - this change will alter their behavior.

Also, implying/forcing 'auto-format' when "-e" is used without "-o" might be a 
bit confusing.
I prefer to have the user explicitly ask for auto-format - at least he/she will 
know how the output would look like.

That being said,
I can send a new patch with one of the new method (implicit autoformat or "-o 
padded") - which one is preferred ?

Thanks,
 -gordon


Reply via email to