bug#25553: tabs still dont work 8 years after last ticket activity?

Kent Dorfman <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 7/21/25 10:39, Paul Eggert wrote:
>
> I can't reproduce the problem with coreutils 9.7, the current version.
>
> Please try the following:
>
> * Run "tabs -4" *after* changing the xterm window size.
>
> * Upgrade to Coreutils 9.7.
>
> * Run 'stty -a' and make sure its output agrees with the actual xterm 
> size. Also, make sure it outputs the capability "tab0".
>
> * Use GDB on 'ls' and investigate what values it assigns the variables 
> 'line_length' and 'tabsize'.
>
> If all those check out but you still see the problem, I'll have more 
> suggestions.

After more careful examination, as I see it, the problem is that ls uses 
tab characters for column alignment instead of hard spaces.  It is 
impossible to guarantee column width unless the tabs command is executed 
"immediately prior" to any invocation of ls.  Otherwise other shell 
environmental issues can can leave the column tab stops "corrupted" and 
the ls command is none the wiser.

Of course the fix is something that requires a bit of sourcecode rework: 
only use hard spaces for column alignment in the coreutils programs...

or a more hackish approach: wrap all invocations of ls in a shell script 
that precedes ls with a call to tabs...YUK!

Anyway, feel free to call this tabs issue closed/shelved.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.