GNU bug report logs - #25388
ls-quotes: kills existing scripts reading "ls" -1 as input

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Sun, 8 Jan 2017 03:53:01 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 25388 <at> debbugs.gnu.org (full text, mbox):

From: L A Walsh <coreutils <at> tlinx.org>
To: Eric Blake <eblake <at> redhat.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, Andreas Schwab <schwab <at> linux-m68k.org>,
 25388 <at> debbugs.gnu.org
Subject: Re: bug#25388: Bug in ls, kills existing scripts reading "ls" -1
 as input
Date: Mon, 09 Jan 2017 11:57:29 -0800
Eric Blake wrote:
> On 01/09/2017 12:48 PM, L A Walsh wrote:
> 
>>> Sure it is. 'ls' has done that since then 1980s. 'ls' shows
>>> multicolumn output when the output is a tty, and single-column output
>>> when piped into a pager.
>>>
>> ----
>>     That's not what I'm used to:
> 
>> ls alias on my machines:
>> alias ls='ls -CF --show-control-chars --color=always'
> 
> That's because you are using an alias to alter 'ls' to non-default
> behavior for your personal default.
> 
> Try again with '\ls' everywhere you previously used 'ls', and you will
> see that output to the terminal is different than output to a file or
> pipeline.
---

Gee guess you missed my 1st response to Andreas:

>     I changed it on my machine to put out color
> even if through a pipe as I usually am piping it through
> 'less' and I want to see the color.  If I want no color --
> I can get the normal text by adding a backslash before
> the command.  
---

So 'backslash' usage -- got that -- disables alias usage.

Thanks.
:-)





This bug report was last modified 6 years and 160 days ago.

Previous Next


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