bug-coreutils
[Top][All Lists]
Advanced

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

bug#22580: shell-escape in tty in ls


From: Pádraig Brady
Subject: bug#22580: shell-escape in tty in ls
Date: Sat, 6 Feb 2016 23:44:48 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 06/02/16 20:28, Paul Vint wrote:
> Maybe I'm the only one, but the new change in ls seems bad:
> 
>       set_quoting_style (NULL, shell_escape_quoting_style);
> 
> This is set if the output is a TTY.
> Why would we want to quote if the output is a TTY?
> 
> It makes the output appear strange to me.
> 
> Example:
> ### Begin paste from terminal  ####
> address@hidden ~ $ mkdir ls
> address@hidden ~ $ cd ls
> address@hidden ~/ls $ touch HelloWorld
> address@hidden ~/ls $ touch Hello\ World
> address@hidden ~/ls $ ls
> 'Hello World'  HelloWorld
> address@hidden ~/ls $ ls -l
> total 0
> -rw-r--r-- 1 pvint users 0 Feb  6 22:35 'Hello World'
> -rw-r--r-- 1 pvint users 0 Feb  6 22:35 HelloWorld
> #### end paste from terminal  ####
> 
> This change occurred at version 8.25
> http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=109b9220cead6e979d22d16327c4d9f8350431cc#patch3
> 
> I don't see the benefit to this change (partly because I'm a stubborn old
> guy who thinks "it's been this way for decades!"), but if there is a good
> one, I'll say "Cool, thanks!".

You can get back to the old way by adding -N to your ls alias.
It's been discussed on the list already but in summary the
main reasons are so that the output from ls is not ambiguous,
and can be cut and pasted to other commands.

thanks,
Pádraig






reply via email to

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