GNU bug report logs - #25078
ls-quotes: discrepancy between `ls' and `ls -1'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Zhiming Wang <zmwangx@HIDDEN>; dated Wed, 30 Nov 2016 20:20:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'ls-quotes: discrepancy between `ls' and `ls -1'' from 'ls 8.26: discrepancy between `ls' and `ls -1' in the alignment of quoted and nonquoted items' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 25078 <at> debbugs.gnu.org:


Received: (at 25078) by debbugs.gnu.org; 1 Dec 2016 02:12:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 21:12:17 2016
Received: from localhost ([127.0.0.1]:47944 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCGrB-0002vz-ED
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 21:12:17 -0500
Received: from mail-qt0-f193.google.com ([209.85.216.193]:35836)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zmwangx@HIDDEN>) id 1cCGr8-0002vl-TU
 for 25078 <at> debbugs.gnu.org; Wed, 30 Nov 2016 21:12:15 -0500
Received: by mail-qt0-f193.google.com with SMTP id m48so21889429qta.2
 for <25078 <at> debbugs.gnu.org>; Wed, 30 Nov 2016 18:12:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=etm6vHAPsl59vgsfjuLmG19B/8sxV5BFv4Oe/+XRfMg=;
 b=xspJGyI5tPiRXUhgWwrioKGzb/0TQYBNLDy/CFXvmowoIBpKG6H6llhxHvoa9X7Sm3
 ed2aJ+QprSHClj4bmGrvshCsdlBoQN3ZFNpsZpwNlveIvNY1okSHAAiXA5cq1DnUKcub
 UfHZDJOOjz4eqsLcomk2TdaBcmzqZUEYAyeC23pRmiO5SLGpmS17mfqbSgraHtQD1Arr
 udpGpNnObHzX8bPO79RPFlJWe7IqNoIaRqnPTloK7xNIF85336BaAExRtw5zT9DSYb3b
 wKgWMZN5K8Dy2t/hT+M0FzXes2FZ8CadmbTp8PyttaLs5SMAawk+OVUlLSMKSACGqOwM
 7lWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=etm6vHAPsl59vgsfjuLmG19B/8sxV5BFv4Oe/+XRfMg=;
 b=EYDlWfX/TqAgmLD4Cue7oUNuRFgWzGvR4PCulHkDdNqjisrRXMAkO9loE3FRR9QsJk
 r5xOkHt+SvnDj+3A/qs1YShALLUdCwVcR4cextT+qVklVSn0IwMQPYWkphN6sKQ+aHAt
 HhMdDbfSBbXfzuo8RbOS8tWQKQcsjTiWN4/Q90eq1yxcigOU9IY7J4WngQwBW7fIkAin
 aZkQfW1f6yaYEtwBmCHhInvmV8Xf4HcjIZH1rG4e068bkuv7qvKyM5r+uhpYB9AmEJqu
 nptYKGZnmY62eDM642paAKO5Xq6F7OxdfIRTD3+OHURuA7CuJj0BHZIbPKpIowGZ2LAD
 fW0A==
X-Gm-Message-State: AKaTC024B6CKyNtNZEQApyPfEcpqnr7uqfZhFVlTbCEv+nHR3YyrdMQBAQNuI+6zJo4wIQ==
X-Received: by 10.200.36.239 with SMTP id t44mr34624403qtt.282.1480558329439; 
 Wed, 30 Nov 2016 18:12:09 -0800 (PST)
Received: from dynamic-oit-pu-dormnet-bb-a-9.princeton.edu
 (dynamic-oit-pu-dormnet-bb-a-9.Princeton.EDU. [140.180.188.8])
 by smtp.gmail.com with ESMTPSA id 16sm34738022qtn.33.2016.11.30.18.12.08
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Nov 2016 18:12:08 -0800 (PST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
Subject: Re: bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the
 alignment of quoted and nonquoted items
From: Zhiming Wang <zmwangx@HIDDEN>
In-Reply-To: <CA+FC_hzjqRLeb+-sCpqoyZyQFNkJ-EYGAX=oSCHUNy--XvJcRw@HIDDEN>
Date: Wed, 30 Nov 2016 21:12:07 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <AEA88BB4-8BC2-407A-8203-5FEF16AE06A9@HIDDEN>
References: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
 <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
 <CA+FC_hzjqRLeb+-sCpqoyZyQFNkJ-EYGAX=oSCHUNy--XvJcRw@HIDDEN>
To: Paul Vint <pjvint@HIDDEN>
X-Mailer: Apple Mail (2.3251)
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 25078
Cc: 25078 <at> debbugs.gnu.org, =?utf-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On Nov 30, 2016, at 8:41 PM, Paul Vint <pjvint@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=C3=A1draig 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=




Information forwarded to bug-coreutils@HIDDEN:
bug#25078; Package coreutils. Full text available.

Message received at 25078 <at> debbugs.gnu.org:


Received: (at 25078) by debbugs.gnu.org; 1 Dec 2016 01:41:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 20:41:53 2016
Received: from localhost ([127.0.0.1]:47927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCGNl-0002Df-8z
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 20:41:53 -0500
Received: from mail-io0-f174.google.com ([209.85.223.174]:33656)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pjvint@HIDDEN>) id 1cCGNj-0002DS-Vx
 for 25078 <at> debbugs.gnu.org; Wed, 30 Nov 2016 20:41:52 -0500
Received: by mail-io0-f174.google.com with SMTP id j65so387620439iof.0
 for <25078 <at> debbugs.gnu.org>; Wed, 30 Nov 2016 17:41:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc; bh=537IYiRtOqdfLPBuaSSyvodODeVi7mhmqqWPxO6+HYo=;
 b=GJbDp0B+VY1vJPJ4XT1/fdaG2m99AwvlMFq6fmnfngS3TcjgcpqWkLROjFXSVAEkm5
 +rY9us4SK6PTfFMjuD9DKrcvVEixq+9bMnbEvkrwRkR1pLiXztCjEQ8c4L+VDMB4M7p3
 zsqIIu6/lujslMmThB0+dNn2LUl9f6DZna2+HsXcvmHskJBDM+We62JchMOTNN9qwqG8
 WIsu4fBvZDEqrpPeSktAcyHu0/TJ+4D6mg4F0v2ztTL7WkwTpfGpqizBtn+AD1674VXM
 QeVhj/D7RV2+HYrqdlLNWUVmRPpWdm1qG/24DRyHyAzW5lrPdvZraWDWlGdDsC3iOKuC
 xW+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc;
 bh=537IYiRtOqdfLPBuaSSyvodODeVi7mhmqqWPxO6+HYo=;
 b=JCF2mU19QrMJlvN1E4tSdL01KHeq60cHsHZwaXvgfB73AFEypElhSBa8d+Yp5b+DMh
 bKD0utTRdFDLvp1wopODRC+lPxLq3cYcsMEPlsAbKLa1V2CidEBoMzx8NXs3cO7g9H3G
 vUQ8eEAejrdpMzESHzumQUAsM1SSaTd93LRwuPWqv5HULlI60Fj/iRsS212xitKD8Ocd
 VGU4W4i29iFOKnTbI0rlSHt6Oq0WPQDEqy1FjCmcVfj3pzvgGClYFzHCqvJLpvH1B+9m
 RoiEnSZaKGR0Ql1213YDO04A98t62Fklz9VDoJmUxRrCIQ5RFVAEPuunhziSwg7EmJbO
 N5/w==
X-Gm-Message-State: AKaTC01jn2ft2OtQDieZBdGssnw7162kCQRFpZC/lznvoJOKGW88hRiIqPIwEuz2xJwwID8+pREQ/sbZXnsslQ==
X-Received: by 10.157.36.135 with SMTP id z7mr21610359ota.124.1480556506271;
 Wed, 30 Nov 2016 17:41:46 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.8.39 with HTTP; Wed, 30 Nov 2016 17:41:45 -0800 (PST)
In-Reply-To: <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
References: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
 <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
From: Paul Vint <pjvint@HIDDEN>
Date: Wed, 30 Nov 2016 20:41:45 -0500
Message-ID: <CA+FC_hzjqRLeb+-sCpqoyZyQFNkJ-EYGAX=oSCHUNy--XvJcRw@HIDDEN>
Subject: Re: bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the
 alignment of quoted and nonquoted items
To: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
Content-Type: multipart/alternative; boundary=94eb2c11509aa06beb05428eec5f
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 25078
Cc: 25078 <at> debbugs.gnu.org, Zhiming Wang <zmwangx@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--94eb2c11509aa06beb05428eec5f
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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.

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. Also, I cannot come up with a
good reason why someone would use ls -1 unless they were scripting it. (add
to that, if anyone using the -1 argument that seems to imply that they know
what they are doing). 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.

I understand when you say "The arguments aren't very strong for not
aligning `ls -1` by default,", however I have given you one (albeit weak)
argument, and for me, I cannot see a strong argument for making ls -1 align
like that. As eluded to above, I cannot think of a scenario where someone
would use ls -1 and want it indented for them.

Cheers,
Paul

On Wed, Nov 30, 2016 at 4:35 PM, P=C3=A1draig Brady <P@HIDDEN> wrot=
e:

> On 30/11/16 20:19, Zhiming Wang wrote:
> > coreutils 8.26 includes the following improvement:
> >
> >> ls now aligns quoted items with non quoted items, which is easier to
> read,
> >> and also better indicates that the quote is not part of the actual nam=
e.
> >
> > which I find to be a welcome addition to the quoting behavior introduce=
d
> in
> > 8.25.
>
> Cool, thanks.
>
> > However, this improvement does not apply to the -1 option, which is
> > puzzling to me. Compare the following (coreutils 8.26 on macOS 10.12.1,
> > 80-column terminal, bash or zsh):
> >
> >     $ ls
> >     '['
> >     'a very very very very very very very very very very very very long
> filename'
> >      b2sum
> >      base32
> >      base64
> >      basename
> >
> >     $ ls -1
> >     '['
> >     'a very very very very very very very very very very very very long
> filename'
> >     b2sum
> >     base32
> >     base64
> >     basename
> >
> > The second invocation with the -1 option leaves much to be desired in
> > comparison to the first invocation.
> >
> > -1 should probably receive the same alignment treatment?
>
> I originally had that but thought it might be more problematic than usefu=
l.
>
> When `ls -1` is used interactively it can be handy to triple click to
> select the whole line, in which case selecting just the file name without
> leading space would be preferred.
>
> Also one can use `ls -1 | less` etc. in "interactive" mode, in which case
> ls couldn't use alignment or it would break lots of scripts, but then
> the output would be inconsistent if alignment was used without the pipe.
>
> Also one can achieve the desired output with `ls -w1` or `ls -x -w1 |
> less`.
>
> The arguments aren't very strong for not aligning `ls -1` by default,
> so we may change this.
>
> thanks,
> P=C3=A1draig
>
>
>
>
>

--94eb2c11509aa06beb05428eec5f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>The alignment change is helpful, but I do h=
ave an argument against doing the same in the -1 case:<br></div>It breaks s=
omething many of us have done in scripts.<br><br></div>Of course we *know* =
that ls -1 isn&#39;t the best way to go, but for quickie scripts it has bee=
n the standby for many. Also, I cannot come up with a good reason why someo=
ne would use ls -1 unless they were scripting it. (add to that, if anyone u=
sing the -1 argument that seems to imply that they know what they are doing=
). 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 wi=
thout any &quot;noise&quot; - no dates and times, no formatting, no anythin=
g, just plain filenames. I think the &quot;list one file per line.&quot; in=
 the man page says it right; just list it.<br><br>I understand when you say=
 &quot;The arguments aren&#39;t very strong for not aligning `ls -1` by def=
ault,&quot;, however I have given you one (albeit weak) argument, and for m=
e, I cannot see a strong argument for making ls -1 align like that. As elud=
ed to above, I cannot think of a scenario where someone would use ls -1 and=
 want it indented for them. =C2=A0 <br><br></div><div>Cheers,<br></div><div=
>Paul<br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, Nov 30, 2016 at 4:35 PM, P=C3=A1draig Brady <span dir=3D"ltr">&=
lt;<a href=3D"mailto:P@HIDDEN" target=3D"_blank">P@HIDDEN</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 30/11/16 20:19, Z=
himing Wang wrote:<br>
&gt; coreutils 8.26 includes the following improvement:<br>
&gt;<br>
&gt;&gt; ls now aligns quoted items with non quoted items, which is easier =
to read,<br>
&gt;&gt; and also better indicates that the quote is not part of the actual=
 name.<br>
&gt;<br>
&gt; which I find to be a welcome addition to the quoting behavior introduc=
ed in<br>
&gt; 8.25.<br>
<br>
Cool, thanks.<br>
<br>
&gt; However, this improvement does not apply to the -1 option, which is<br=
>
&gt; puzzling to me. Compare the following (coreutils 8.26 on macOS 10.12.1=
,<br>
&gt; 80-column terminal, bash or zsh):<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0$ ls<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;[&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;a very very very very very very very very very=
 very very very long filename&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 b2sum<br>
&gt;=C2=A0 =C2=A0 =C2=A0 base32<br>
&gt;=C2=A0 =C2=A0 =C2=A0 base64<br>
&gt;=C2=A0 =C2=A0 =C2=A0 basename<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0$ ls -1<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;[&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;a very very very very very very very very very=
 very very very long filename&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0b2sum<br>
&gt;=C2=A0 =C2=A0 =C2=A0base32<br>
&gt;=C2=A0 =C2=A0 =C2=A0base64<br>
&gt;=C2=A0 =C2=A0 =C2=A0basename<br>
&gt;<br>
&gt; The second invocation with the -1 option leaves much to be desired in<=
br>
&gt; comparison to the first invocation.<br>
&gt;<br>
&gt; -1 should probably receive the same alignment treatment?<br>
<br>
I originally had that but thought it might be more problematic than useful.=
<br>
<br>
When `ls -1` is used interactively it can be handy to triple click to<br>
select the whole line, in which case selecting just the file name without<b=
r>
leading space would be preferred.<br>
<br>
Also one can use `ls -1 | less` etc. in &quot;interactive&quot; mode, in wh=
ich case<br>
ls couldn&#39;t use alignment or it would break lots of scripts, but then<b=
r>
the output would be inconsistent if alignment was used without the pipe.<br=
>
<br>
Also one can achieve the desired output with `ls -w1` or `ls -x -w1 | less`=
.<br>
<br>
The arguments aren&#39;t very strong for not aligning `ls -1` by default,<b=
r>
so we may change this.<br>
<br>
thanks,<br>
P=C3=A1draig<br>
<br>
<br>
<br>
<br>
</blockquote></div><br></div>

--94eb2c11509aa06beb05428eec5f--




Information forwarded to bug-coreutils@HIDDEN:
bug#25078; Package coreutils. Full text available.

Message received at 25078 <at> debbugs.gnu.org:


Received: (at 25078) by debbugs.gnu.org; 30 Nov 2016 21:48:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 16:48:09 2016
Received: from localhost ([127.0.0.1]:47818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCCjZ-0001ae-CL
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 16:48:09 -0500
Received: from mail-qk0-f175.google.com ([209.85.220.175]:34548)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zmwangx@HIDDEN>) id 1cCCjY-0001aS-Bp
 for 25078 <at> debbugs.gnu.org; Wed, 30 Nov 2016 16:48:08 -0500
Received: by mail-qk0-f175.google.com with SMTP id q130so37482552qke.1
 for <25078 <at> debbugs.gnu.org>; Wed, 30 Nov 2016 13:48:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=1qFAuGIaU9tLgYftDLFl4ip4lM3Nv1OUVf2BHcW5LFI=;
 b=SKMBLBdo/nhB/YgzjkoC/02lNBTLIKfINBbeJiKqAowE9hRjasv7eP3huiBx61lEHv
 YmWRnOHbnZV6V6xUMymGEdnCZfD03V/38cECm0BCwcfOKEzlwCMjXQ513HvQnGf1V5WV
 YQ6vlRVbhyHyLvOLX9NGc5lggV1jQ9p+dz/6kq+7EouQEiSQoD4K5pRD5DpZRM4OV1Bd
 clwgJnOqOlIjIMum/qMuND6RZ9PhtJ1ZwI//w0Int+ffSZuf0Nrodzoe+xYKkC7XkdQI
 7upBX5hDzURlD2XR5ABB4x0aaJ//epRjVb/mD4oo8yG3UFBnhZI1h6D8yoZcNqF6/wrZ
 SmxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to;
 bh=1qFAuGIaU9tLgYftDLFl4ip4lM3Nv1OUVf2BHcW5LFI=;
 b=mMyoGQQAa/ipcYG9zNIHFHgefczG+msr5QcAJk/ih7V1q106iLHlW6+XXqD0y8Lz4f
 RLELiisvVblWKbhJwtq0ilP/6TG495jkIf25V4MErwGym2h8rsp2pW4byMCe1zWwVval
 z8CWLXSvzsYL65ltP5tt8229x+o8aw1/sl18luD3gdYrSuS+W/5JSMz56pAXwdZCUPJN
 WHaPDDta+IopTyUhaMadHPwIRBKXlg60E8QBEWVVOxMU+JcMLrwxx12UWw8W3YUNe87X
 egzbdai5YuHbGI87SKdmQpYgQriJHWgc02c7AjfWuWOZoC+VX6T3gIqtEnf4QHcN6U4u
 ykjA==
X-Gm-Message-State: AKaTC03z3I5N5haVudD4OSTPX4XuyBSAAvXRbS6/hhuRzt6rF/vOdecLbI3UJHN6c3m26A==
X-Received: by 10.55.10.142 with SMTP id 136mr29382862qkk.192.1480542482900;
 Wed, 30 Nov 2016 13:48:02 -0800 (PST)
Received: from dynamic-oit-pu-dormnet-bb-a-9.princeton.edu
 (dynamic-oit-pu-dormnet-bb-a-9.Princeton.EDU. [140.180.188.8])
 by smtp.gmail.com with ESMTPSA id y23sm34372933qta.40.2016.11.30.13.48.02
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Nov 2016 13:48:02 -0800 (PST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
Subject: Re: bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the
 alignment of quoted and nonquoted items
From: Zhiming Wang <zmwangx@HIDDEN>
In-Reply-To: <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
Date: Wed, 30 Nov 2016 16:48:01 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <603991DF-2B8A-4FCF-9A68-16BC8115353B@HIDDEN>
References: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
 <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
To: =?utf-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
X-Mailer: Apple Mail (2.3251)
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 25078
Cc: 25078 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> On Nov 30, 2016, at 4:35 PM, P=C3=A1draig Brady <P@HIDDEN> =
wrote:
>=20
> When `ls -1` is used interactively it can be handy to triple click to
> select the whole line, in which case selecting just the file name =
without
> leading space would be preferred.

I had this thought as well because I've been triple clicking ls output a
lot since 8.25, but then I realized when the filename is one single blob
that doesn't need quoting, I can (at least in my terminal emulator) just
double click to select it anyway, so it doesn't really matter.

> Also one can use `ls -1 | less` etc. in "interactive" mode, in which =
case
> ls couldn't use alignment or it would break lots of scripts, but then
> the output would be inconsistent if alignment was used without the =
pipe.

Yeah, that's a valid argument.

> Also one can achieve the desired output with `ls -w1` or `ls -x -w1 | =
less`.

Didn't think of `ls -w1`. I'll use that, thanks.

Best,
Zhiming=




Information forwarded to bug-coreutils@HIDDEN:
bug#25078; Package coreutils. Full text available.

Message received at 25078 <at> debbugs.gnu.org:


Received: (at 25078) by debbugs.gnu.org; 30 Nov 2016 21:35:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 16:35:53 2016
Received: from localhost ([127.0.0.1]:47814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCCXh-0001J7-8H
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 16:35:53 -0500
Received: from mail.magicbluesmoke.com ([82.195.144.49]:32798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <P@HIDDEN>) id 1cCCXf-0001Iz-Ki
 for 25078 <at> debbugs.gnu.org; Wed, 30 Nov 2016 16:35:52 -0500
Received: from [192.168.1.80] (unknown [109.79.127.159])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 24203126;
 Wed, 30 Nov 2016 21:35:50 +0000 (GMT)
Subject: Re: bug#25078: ls 8.26: discrepancy between `ls' and `ls -1' in the
 alignment of quoted and nonquoted items
To: Zhiming Wang <zmwangx@HIDDEN>, 25078 <at> debbugs.gnu.org
References: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@HIDDEN>
Message-ID: <00c46f19-fc6f-1caf-b917-c2d6cd69e803@HIDDEN>
Date: Wed, 30 Nov 2016 21:35:49 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 25078
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

On 30/11/16 20:19, Zhiming Wang wrote:
> coreutils 8.26 includes the following improvement:
> 
>> ls now aligns quoted items with non quoted items, which is easier to read,
>> and also better indicates that the quote is not part of the actual name.
> 
> which I find to be a welcome addition to the quoting behavior introduced in
> 8.25.

Cool, thanks.

> However, this improvement does not apply to the -1 option, which is
> puzzling to me. Compare the following (coreutils 8.26 on macOS 10.12.1,
> 80-column terminal, bash or zsh):
> 
>     $ ls
>     '['
>     'a very very very very very very very very very very very very long filename'
>      b2sum
>      base32
>      base64
>      basename
> 
>     $ ls -1
>     '['
>     'a very very very very very very very very very very very very long filename'
>     b2sum
>     base32
>     base64
>     basename
> 
> The second invocation with the -1 option leaves much to be desired in
> comparison to the first invocation.
> 
> -1 should probably receive the same alignment treatment?

I originally had that but thought it might be more problematic than useful.

When `ls -1` is used interactively it can be handy to triple click to
select the whole line, in which case selecting just the file name without
leading space would be preferred.

Also one can use `ls -1 | less` etc. in "interactive" mode, in which case
ls couldn't use alignment or it would break lots of scripts, but then
the output would be inconsistent if alignment was used without the pipe.

Also one can achieve the desired output with `ls -w1` or `ls -x -w1 | less`.

The arguments aren't very strong for not aligning `ls -1` by default,
so we may change this.

thanks,
Pádraig





Information forwarded to bug-coreutils@HIDDEN:
bug#25078; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Nov 2016 20:19:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 30 15:19:19 2016
Received: from localhost ([127.0.0.1]:47799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cCBLb-0007vN-3V
	for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 15:19:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zmwangx@HIDDEN>) id 1cCBLY-0007v7-SW
 for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 15:19:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <zmwangx@HIDDEN>) id 1cCBLS-0000gg-Qx
 for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 15:19:11 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55621)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <zmwangx@HIDDEN>) id 1cCBLS-0000gZ-NA
 for submit <at> debbugs.gnu.org; Wed, 30 Nov 2016 15:19:10 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49920)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <zmwangx@HIDDEN>) id 1cCBLR-0006tY-LE
 for bug-coreutils@HIDDEN; Wed, 30 Nov 2016 15:19:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <zmwangx@HIDDEN>) id 1cCBLO-0000f4-3w
 for bug-coreutils@HIDDEN; Wed, 30 Nov 2016 15:19:09 -0500
Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:34185)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <zmwangx@HIDDEN>) id 1cCBLN-0000e3-Vj
 for bug-coreutils@HIDDEN; Wed, 30 Nov 2016 15:19:06 -0500
Received: by mail-qk0-x244.google.com with SMTP id y205so23462053qkb.1
 for <bug-coreutils@HIDDEN>; Wed, 30 Nov 2016 12:19:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=3mib9qiWVhbQIRTTPK/TkSo3fHj74tOyd2aO93zY8f8=;
 b=I/o8HxNZKI6bPo+desHWoBd/XvqdbGjcu1/Ek2Oe0JQT15DgsjEM5Iai5+Vxuvb6l+
 FedhsNuq6NEvl0DAPWMZLx4r3Y+QQQdZ6SqqxE9FIOOD9EgnhnCxCYQi8nry3HxMlj2s
 yABf5Hhvv8RN3OS0ZRcKUlWkeJnyvqUhRwy0/QVYdA1HZ2a3WJ5yjCAU+mHj2U2LwOnZ
 8Z8iTM/1rYnrDlh/Vh5QLcBWPQdeP7wO2lf+M0rrJfCek1MBJjxST5DIwG7M/yGHJNUq
 PiZMY73xeOBMT3YTzYb8BiNBnyCc/cTazl5vr7PlWbvnoK+f03cwuTZH8ZLoJiq7yplO
 XmPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=3mib9qiWVhbQIRTTPK/TkSo3fHj74tOyd2aO93zY8f8=;
 b=PfeRaPd3yFC+lBFDDnfQszoPBlL95xO+g465nJRK2GKpMhr+bPZJuqzXV7nsqKkCxw
 b9l1OK4ufAomFk9SmIOhr4ttPHMXC0axUCMv8BRLcFl4Qe1z2zzMkSXiOCcqjNluH8nH
 GFn1lg+F8NcYT1eEQu7pjRyzQHqalCiFp6y53DS2LlRhpTPypf0A8wHC5YyuF50mCOUd
 Kc0xKnVwKQF4xITdRwGGewEOlbC2ztkqbKOOaxeAFrkzgm65eFw1W7QKW/XpUFSNw0h8
 xBzJi6wMHpC3OwQNUsxiSAjH86p2TakjJNOT7VNUI9vzW6S55gJ9gPJ17UFxD64Kq8u5
 wGHg==
X-Gm-Message-State: AKaTC03DaAiGGsw1V8Pg6WlAfcm1A3kumaYiFoi6tcwkfSy53pJQwpX2uWO/UtSnIH9Hyg==
X-Received: by 10.55.97.194 with SMTP id v185mr34390673qkb.80.1480537142230;
 Wed, 30 Nov 2016 12:19:02 -0800 (PST)
Received: from dynamic-oit-pu-dormnet-bb-a-9.princeton.edu
 (dynamic-oit-pu-dormnet-bb-a-9.Princeton.EDU. [140.180.188.8])
 by smtp.gmail.com with ESMTPSA id n188sm34119600qkc.30.2016.11.30.12.19.01
 for <bug-coreutils@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Nov 2016 12:19:01 -0800 (PST)
From: Zhiming Wang <zmwangx@HIDDEN>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
Subject: ls 8.26: discrepancy between `ls' and `ls -1' in the alignment of
 quoted and nonquoted items
Message-Id: <C4918A39-9F4A-4E0B-BA4C-055F2E159148@HIDDEN>
Date: Wed, 30 Nov 2016 15:19:00 -0500
To: bug-coreutils@HIDDEN
X-Mailer: Apple Mail (2.3251)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

coreutils 8.26 includes the following improvement:

> ls now aligns quoted items with non quoted items, which is easier to =
read,
> and also better indicates that the quote is not part of the actual =
name.

which I find to be a welcome addition to the quoting behavior introduced =
in
8.25. However, this improvement does not apply to the -1 option, which =
is
puzzling to me. Compare the following (coreutils 8.26 on macOS 10.12.1,
80-column terminal, bash or zsh):

    $ ls
    '['
    'a very very very very very very very very very very very very long =
filename'
     b2sum
     base32
     base64
     basename

    $ ls -1
    '['
    'a very very very very very very very very very very very very long =
filename'
    b2sum
    base32
    base64
    basename

The second invocation with the -1 option leaves much to be desired in
comparison to the first invocation.

-1 should probably receive the same alignment treatment?

Best,
Zhiming





Acknowledgement sent to Zhiming Wang <zmwangx@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#25078; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 28 Oct 2018 07:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.