coreutils
[Top][All Lists]
Advanced

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

Re: Enhancement suggestion for "expand"


From: Pádraig Brady
Subject: Re: Enhancement suggestion for "expand"
Date: Sun, 13 Jan 2013 23:34:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 09/18/2012 03:18 PM, CoreUtils subscribtion for PLC wrote:
Hi

This post is about a possible enhancement to the "expand" command included in 
coreutils.

I oten use expand to format scripts output by manually setting tabs stop. The idea would be to 
add an option to "expand" to be able to auto-set tabstops by analyzing first 
<n> lines of test (0 for analyzing whole stream) so that the TS would be set to the 
minimum number of spaces to obtains clean columns.

Best regards

plc

So for input with just leading tabs, they would be expanded to a single space,
but in the presence of both leading tabs and spaces, the tab width would
be set to the minimum such that non blanks only start at a tab stop.

Interesting idea, though not very useful I would expect,
since you'd probably have to specify a minimum with the --tabs option,
at which stage you don't have much advantage over just setting --tabs directly.

thanks,
Pádraig.



reply via email to

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