bug-coreutils
[Top][All Lists]
Advanced

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

Re: wc support for different tab widths


From: Bob Proulx
Subject: Re: wc support for different tab widths
Date: Wed, 3 Jun 2009 23:24:58 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Sebastian,

Sebastian Bozlee wrote:
> I'm sorry if this is the wrong place to post this.

This is the right place for discussion about 'wc' and development for
it.  Along with any of the other coreutils.

> This is my first contribution to an open source project, so feedback
> is appreciated. I don't expect it to be put in the official code.

Welcome!

> I've added the ability to count tabs as any number of spaces over 0 to
> wc. It's used like this:
> wc -L --tab-width=4 [files...]

The threshold for adding single letter options is pretty high.  To do
that would need pretty strong reasons.  So it would be unlikely that
a -L option would get added.  Long options are available however.

The big problem with the feature you are adding is that it already
exists in the 'expand' program.  Therefore it isn't needed in 'wc'.
If you haven't looked at it please look at the 'expand' program.

  expand -t8 SOMEFILE | wc

The Unix philosophy is that small programs are built in such a way
that they can be combined together and create by the combination more
powerful programs.  The 'expand' program knows all about expanding
tabs.  The 'wc' program knows all about counts.  Combined they know
all about counting files with tabs.

I am hoping this doesn't discourage you.  In particular it is very
unusual to actually receive code patches along with suggestions.  That
was great!

Bob




reply via email to

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