bug-coreutils
[Top][All Lists]
Advanced

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

bug#25553: How many coreutils rely on tabs to align things (other, than


From: L A Walsh
Subject: bug#25553: How many coreutils rely on tabs to align things (other, than 'du'?
Date: Sat, 28 Jan 2017 14:45:24 -0800
User-agent: Thunderbird



Paul Eggert wrote:
L A Walsh wrote:
I'm working on some loose ends, but basically,
First, it would default to providing no change.  ;-)

Through use of a switch it can expand the tabs to spaces
using a default of every 8th column (after 1) (using a
switch value of 'ExpandTo').

And with 2 env vars, TTY_TABSIZE & TTY_TABSET
it can re-entabulate the output to use the user's tabsize as related through the
env vars.

It sounds like this could be done via 'du | expand', so why change 'du'?

Also, environment variables cause too many problems. If new functionality is needed here (which is not yet clear), it should be via new options.
---
        The idea would be to have it be transparent. Adding
on various output filters is hardly transparent. So would you care to show me how you would invoke expand to change 'du's tab-output to that on my output device (terminal seems a bit of
a misnomer these days), but it is a tty-type window compatible
with xterm, the linux console, vt100's/vt102's as well some standards.

        As for env-vars.  What problems are you envisioning.
As I mentioned, both env-vars and program options are required --
they serve different purposes.  Alternatively, you could have
settings files (i.e. /etc/gnurc & "~/.gnurc") that could store
settings designed to apply across multiple tools, but like the
ENV settings I'm conceiving of would be like the envvar "TERM"
or an LC_CTYPE to describe the output device's character encoding.

        Indeed, in this case, TTY_TAB settings are specific
to a person's terminal -- just like TERM and LC_CTYPE

What type of problems outweighing the benefits do you see with env vars like TERM and LC_CTYPE.

        As for 'expand' handling the job -- how would
expand convert tabstops from 'du' into the tabstops used by
an arbitrary terminal?  For that matter, since directory and
file sizes often exceed 8-characters forcing du's output to not align, how can a user have 'du' align it's columns
automatically, as my additions can do?










reply via email to

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