|
From: | L A Walsh |
Subject: | bug#25553: How many coreutils rely on tabs to align things (other, than 'du'? |
Date: | Fri, 27 Jan 2017 18:33:57 -0800 |
User-agent: | Thunderbird |
Paul Eggert wrote:
L A Walsh wrote:Are there other utils that rely on tabs to align output as much as 'du'?Sure. 'ls', 'fmt', 'cut', 'cat', 'pr',....What would be objections to fixing 'du' or others that rely on such?It would depend on the proposed change.
----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_TABSETit can re-entabulate the output to use the user's tabsize as related through the env vars.
The env vars cause no change in program behavior unless the switch specifies 'AlignTo'. I developed the 'tabout' feature in a 'tabout.c+h' file and added it to 'du' -- but noted it was not the best way to test, so wrote a driver-program, 'retab', to allow focus testing on the retabbing code that does the retabbing on files or stdin and sends the result to stdout. ...that's a rough description... Will let you know as I finish off some loose ends and code refactoring/tidying...
[Prev in Thread] | Current Thread | [Next in Thread] |