bug-coreutils
[Top][All Lists]
Advanced

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

bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the alignmen


From: Zhiming Wang
Subject: bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the alignment of quoted and nonquoted items
Date: Wed, 30 Nov 2016 21:12:07 -0500

On Nov 30, 2016, at 8:41 PM, Paul Vint <address@hidden> wrote:
> The alignment change is helpful, but I do have an argument against doing the
> same in the -1 case: It breaks something many of us have done in scripts.

It breaks nothing. Quoting and alignment by default only happens when stdout is
a tty. Also, ls prints one entry per line when stdout is not a tty; you don't
even need -1.

> Of course we *know* that ls -1 isn't the best way to go, but for quickie
> scripts it has been the standby for many.

Parsing ls output not only "isn't the best way", it's also wrong (tm). You know
that, but I still want to point it out. Not saying compatibility should be
broken; as already said, nothing is broken.

> Also, I cannot come up with a good
> reason why someone would use ls -1 unless they were scripting it.

Pádraig already mentioned one: "When `ls -1` is used interactively it can be
handy to triple click to select the whole line." Also, one per line is easier
on my eyes.

> (add to that, if anyone using the -1 argument that seems to imply that they
> know what they are doing).

Not sure what you're implying.

> Having said that, I am thinking about it now an know that I have
> used ls-1 before just to see the output, and I used it to see the honest 
> output
> without any "noise" - no dates and times, no formatting, no anything, just
> plain filenames. I think the "list one file per line." in the man page says it
> right; just list it.

That's more of an argument against quoting than alignment. You should probably
open a new discussion (and you've had quite a while to do that).

> As eluded to above, I cannot think of a scenario where someone would use ls
> -1 and want it indented for them.

The fact that I even bothered to open this issue probably says something about
someone wanting to use `ls -1` and see the results aligned.

Best,
Zhiming




reply via email to

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