Why is 'ls' suddenly wrapping items with spaces in single quotes?
I just noticed that on one of my machines (running Debian Sid) whenever I type ls
any file name with spaces has single quotes surrounding it.
I immediately checked my aliases, only to find them intact.
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt
wyatt@debian630:~/testdir$ alias
alias ls='ls --color=auto'
alias wget='wget --content-disposition'
wyatt@debian630:~/testdir$
(picture)
Another test, with files containing single quotes in their names (also answering a request by jimmij):
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt 'thishasasinglequotehere'''.txt'
wyatt@debian630:~/testdir$ touch "'test 1.txt'"
wyatt@debian630:~/testdir$ ls
''''test 1.txt'''' test1.txt
'test 1.txt' 'thishasasinglequotehere'''.txt'
(picture)
update with new coreutils-8.26 output (which is admittedly much less confusing, but still irritating to have by default). Thanks to Pádraig Brady for this printout:
$ ls
"'test 1.txt'" test1.txt
'test 1.txt' "thishasasinglequotehere'.txt"
$ ls -N
'test 1.txt' test1.txt
test 1.txt thishasasinglequotehere'.txt
Why is this happening? How do I stop it properly?
to clarify, I myself set ls to automatically color output. It never put quotes around things before.
I'm running bash
and coreutils 8.25.
EDIT:
Appears the coreutils developers thought (link) it would be a good idea to make that a global default despite breaking the principle of least astonishment as well as 46+ years of UNIX tradition.
Any way to fix this without a recompile?
UPDATE - October 2017 - Debian Sid has re-enabled the shell escape quoting by default. This is just getting ridiculous. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877582
And at the bottom of the reply chain to the previous bug report, "the change was intentional and will remain." https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#226
I thought this was settled. Apparently not.
Update: Android toybox ls
is now doing something similar to this but with backslashes instead of quotes. Using the -q option makes spaces render as 'question mark characters' (I have not checked what they are, since they're obviously not spaces), so the only fix I have found so far without rooting the device in question is to add this to a script and source it when launching a shell. This function makes ls
use columns if in a terminal and otherwise print one-per-line, while tricking ls
into printing spaces verbatim because it's running through a pipe.
ls() {
# only way I can stop ls from escaping with backslashes
if [ -t 1 ]; then
/system/bin/ls -C "$@" |cat
else
/system/bin/ls "$@" |cat
fi
}
debian ls quoting upgrade coreutils
|
show 16 more comments
I just noticed that on one of my machines (running Debian Sid) whenever I type ls
any file name with spaces has single quotes surrounding it.
I immediately checked my aliases, only to find them intact.
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt
wyatt@debian630:~/testdir$ alias
alias ls='ls --color=auto'
alias wget='wget --content-disposition'
wyatt@debian630:~/testdir$
(picture)
Another test, with files containing single quotes in their names (also answering a request by jimmij):
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt 'thishasasinglequotehere'''.txt'
wyatt@debian630:~/testdir$ touch "'test 1.txt'"
wyatt@debian630:~/testdir$ ls
''''test 1.txt'''' test1.txt
'test 1.txt' 'thishasasinglequotehere'''.txt'
(picture)
update with new coreutils-8.26 output (which is admittedly much less confusing, but still irritating to have by default). Thanks to Pádraig Brady for this printout:
$ ls
"'test 1.txt'" test1.txt
'test 1.txt' "thishasasinglequotehere'.txt"
$ ls -N
'test 1.txt' test1.txt
test 1.txt thishasasinglequotehere'.txt
Why is this happening? How do I stop it properly?
to clarify, I myself set ls to automatically color output. It never put quotes around things before.
I'm running bash
and coreutils 8.25.
EDIT:
Appears the coreutils developers thought (link) it would be a good idea to make that a global default despite breaking the principle of least astonishment as well as 46+ years of UNIX tradition.
Any way to fix this without a recompile?
UPDATE - October 2017 - Debian Sid has re-enabled the shell escape quoting by default. This is just getting ridiculous. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877582
And at the bottom of the reply chain to the previous bug report, "the change was intentional and will remain." https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#226
I thought this was settled. Apparently not.
Update: Android toybox ls
is now doing something similar to this but with backslashes instead of quotes. Using the -q option makes spaces render as 'question mark characters' (I have not checked what they are, since they're obviously not spaces), so the only fix I have found so far without rooting the device in question is to add this to a script and source it when launching a shell. This function makes ls
use columns if in a terminal and otherwise print one-per-line, while tricking ls
into printing spaces verbatim because it's running through a pipe.
ls() {
# only way I can stop ls from escaping with backslashes
if [ -t 1 ]; then
/system/bin/ls -C "$@" |cat
else
/system/bin/ls "$@" |cat
fi
}
debian ls quoting upgrade coreutils
16
Yet another reason why not parser thels
command.
– jimmij
Jan 30 '16 at 7:27
10
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Tryls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P
– Bjorn Munch
Jan 30 '16 at 9:06
5
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to'*'
. I guess I'll go around addingls
aliases to all my machines to get rid of it...
– Limited Atonement
Feb 12 '16 at 18:57
14
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variableQUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)
– LSpice
Feb 15 '16 at 23:15
3
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable withl --quoting=shell-escape
(or other quoting style).
– LSpice
Feb 16 '16 at 3:35
|
show 16 more comments
I just noticed that on one of my machines (running Debian Sid) whenever I type ls
any file name with spaces has single quotes surrounding it.
I immediately checked my aliases, only to find them intact.
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt
wyatt@debian630:~/testdir$ alias
alias ls='ls --color=auto'
alias wget='wget --content-disposition'
wyatt@debian630:~/testdir$
(picture)
Another test, with files containing single quotes in their names (also answering a request by jimmij):
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt 'thishasasinglequotehere'''.txt'
wyatt@debian630:~/testdir$ touch "'test 1.txt'"
wyatt@debian630:~/testdir$ ls
''''test 1.txt'''' test1.txt
'test 1.txt' 'thishasasinglequotehere'''.txt'
(picture)
update with new coreutils-8.26 output (which is admittedly much less confusing, but still irritating to have by default). Thanks to Pádraig Brady for this printout:
$ ls
"'test 1.txt'" test1.txt
'test 1.txt' "thishasasinglequotehere'.txt"
$ ls -N
'test 1.txt' test1.txt
test 1.txt thishasasinglequotehere'.txt
Why is this happening? How do I stop it properly?
to clarify, I myself set ls to automatically color output. It never put quotes around things before.
I'm running bash
and coreutils 8.25.
EDIT:
Appears the coreutils developers thought (link) it would be a good idea to make that a global default despite breaking the principle of least astonishment as well as 46+ years of UNIX tradition.
Any way to fix this without a recompile?
UPDATE - October 2017 - Debian Sid has re-enabled the shell escape quoting by default. This is just getting ridiculous. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877582
And at the bottom of the reply chain to the previous bug report, "the change was intentional and will remain." https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#226
I thought this was settled. Apparently not.
Update: Android toybox ls
is now doing something similar to this but with backslashes instead of quotes. Using the -q option makes spaces render as 'question mark characters' (I have not checked what they are, since they're obviously not spaces), so the only fix I have found so far without rooting the device in question is to add this to a script and source it when launching a shell. This function makes ls
use columns if in a terminal and otherwise print one-per-line, while tricking ls
into printing spaces verbatim because it's running through a pipe.
ls() {
# only way I can stop ls from escaping with backslashes
if [ -t 1 ]; then
/system/bin/ls -C "$@" |cat
else
/system/bin/ls "$@" |cat
fi
}
debian ls quoting upgrade coreutils
I just noticed that on one of my machines (running Debian Sid) whenever I type ls
any file name with spaces has single quotes surrounding it.
I immediately checked my aliases, only to find them intact.
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt
wyatt@debian630:~/testdir$ alias
alias ls='ls --color=auto'
alias wget='wget --content-disposition'
wyatt@debian630:~/testdir$
(picture)
Another test, with files containing single quotes in their names (also answering a request by jimmij):
wyatt@debian630:~/testdir$ ls
'test 1.txt' test1.txt 'thishasasinglequotehere'''.txt'
wyatt@debian630:~/testdir$ touch "'test 1.txt'"
wyatt@debian630:~/testdir$ ls
''''test 1.txt'''' test1.txt
'test 1.txt' 'thishasasinglequotehere'''.txt'
(picture)
update with new coreutils-8.26 output (which is admittedly much less confusing, but still irritating to have by default). Thanks to Pádraig Brady for this printout:
$ ls
"'test 1.txt'" test1.txt
'test 1.txt' "thishasasinglequotehere'.txt"
$ ls -N
'test 1.txt' test1.txt
test 1.txt thishasasinglequotehere'.txt
Why is this happening? How do I stop it properly?
to clarify, I myself set ls to automatically color output. It never put quotes around things before.
I'm running bash
and coreutils 8.25.
EDIT:
Appears the coreutils developers thought (link) it would be a good idea to make that a global default despite breaking the principle of least astonishment as well as 46+ years of UNIX tradition.
Any way to fix this without a recompile?
UPDATE - October 2017 - Debian Sid has re-enabled the shell escape quoting by default. This is just getting ridiculous. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877582
And at the bottom of the reply chain to the previous bug report, "the change was intentional and will remain." https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#226
I thought this was settled. Apparently not.
Update: Android toybox ls
is now doing something similar to this but with backslashes instead of quotes. Using the -q option makes spaces render as 'question mark characters' (I have not checked what they are, since they're obviously not spaces), so the only fix I have found so far without rooting the device in question is to add this to a script and source it when launching a shell. This function makes ls
use columns if in a terminal and otherwise print one-per-line, while tricking ls
into printing spaces verbatim because it's running through a pipe.
ls() {
# only way I can stop ls from escaping with backslashes
if [ -t 1 ]; then
/system/bin/ls -C "$@" |cat
else
/system/bin/ls "$@" |cat
fi
}
debian ls quoting upgrade coreutils
debian ls quoting upgrade coreutils
edited Mar 4 at 14:43
Wyatt8740
asked Jan 30 '16 at 6:43
Wyatt8740Wyatt8740
1,7692817
1,7692817
16
Yet another reason why not parser thels
command.
– jimmij
Jan 30 '16 at 7:27
10
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Tryls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P
– Bjorn Munch
Jan 30 '16 at 9:06
5
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to'*'
. I guess I'll go around addingls
aliases to all my machines to get rid of it...
– Limited Atonement
Feb 12 '16 at 18:57
14
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variableQUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)
– LSpice
Feb 15 '16 at 23:15
3
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable withl --quoting=shell-escape
(or other quoting style).
– LSpice
Feb 16 '16 at 3:35
|
show 16 more comments
16
Yet another reason why not parser thels
command.
– jimmij
Jan 30 '16 at 7:27
10
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Tryls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P
– Bjorn Munch
Jan 30 '16 at 9:06
5
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to'*'
. I guess I'll go around addingls
aliases to all my machines to get rid of it...
– Limited Atonement
Feb 12 '16 at 18:57
14
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variableQUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)
– LSpice
Feb 15 '16 at 23:15
3
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable withl --quoting=shell-escape
(or other quoting style).
– LSpice
Feb 16 '16 at 3:35
16
16
Yet another reason why not parser the
ls
command.– jimmij
Jan 30 '16 at 7:27
Yet another reason why not parser the
ls
command.– jimmij
Jan 30 '16 at 7:27
10
10
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Try
ls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P– Bjorn Munch
Jan 30 '16 at 9:06
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Try
ls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P– Bjorn Munch
Jan 30 '16 at 9:06
5
5
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to
'*'
. I guess I'll go around adding ls
aliases to all my machines to get rid of it...– Limited Atonement
Feb 12 '16 at 18:57
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to
'*'
. I guess I'll go around adding ls
aliases to all my machines to get rid of it...– Limited Atonement
Feb 12 '16 at 18:57
14
14
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variable
QUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)– LSpice
Feb 15 '16 at 23:15
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variable
QUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)– LSpice
Feb 15 '16 at 23:15
3
3
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable with
l --quoting=shell-escape
(or other quoting style).– LSpice
Feb 16 '16 at 3:35
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable with
l --quoting=shell-escape
(or other quoting style).– LSpice
Feb 16 '16 at 3:35
|
show 16 more comments
3 Answers
3
active
oldest
votes
Preface: While it may be quite satisfying to upvote an answer such as this and call it a day, please be assured that GNU developers do not care about SO answer votes, & that if you actually want to encourage them to change, you need to email them as this answer describes.
"Why is this happening?"
Several coreutils developers decided they knew better than decades of de facto standards.
"How do I stop it properly?"
http://www.gnu.org/software/coreutils/coreutils.html:
Bug Reports
If you think you have found a bug in Coreutils, then please send as
complete a bug report as possible to <bug-coreutils@gnu.org>, and it
will automatically be entered into the Coreutils bug tracker. Before
reporting bugs please read the FAQ. A very useful and often referenced
guide on how to write bug reports and ask good questions is the
document How To Ask Questions The Smart Way . You can browse previous
postings and search the bug-coreutils archive.
Distros that have already reverted this change:
Debian coreutils-8.25-2
Including consequently, presumably, Ubuntu and all of the hundreds of Debian-based and Ubuntu-based derivatives
Distros unaffected:
- openSUSE (already used -N)
"Any way to fix this without a recompile?"
Proponents would have you...
get back to the old format by adding -N to their ls alias
…on all of your installs, everywhere, for the remainder of eternity.
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short withls
what you see no longer is how it's stored. That feature should be optional, not the default.
– user86969
May 26 '16 at 13:19
|
show 18 more comments
You can chose quoting style:
ls --quoting-style=literal
The same as:
ls -N
or:
QUOTING_STYLE=literal ls
Make it an alias, or set export QUOTING_STYLE=literal
in your .bashrc
to achieve pre-8.25 behavior.
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
For pre-8.25 behavior, useexport QUOTING_STYLE=literal
in your bashrc.
– Lekensteyn
Jan 31 '16 at 11:07
1
or use-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.
– Wyatt8740
Jan 31 '16 at 15:12
1
@LSpice I have edited the post to useliteral
instead ofescape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting theescape
style).
– Lekensteyn
Feb 16 '16 at 10:31
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
|
show 9 more comments
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn't break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding -N to their ls alias
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
@PádraigBrady So, are you going to keepls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.
– Chris Warrick
Apr 24 '16 at 18:39
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
|
show 27 more comments
protected by don_crissti Jul 4 '16 at 18:20
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Preface: While it may be quite satisfying to upvote an answer such as this and call it a day, please be assured that GNU developers do not care about SO answer votes, & that if you actually want to encourage them to change, you need to email them as this answer describes.
"Why is this happening?"
Several coreutils developers decided they knew better than decades of de facto standards.
"How do I stop it properly?"
http://www.gnu.org/software/coreutils/coreutils.html:
Bug Reports
If you think you have found a bug in Coreutils, then please send as
complete a bug report as possible to <bug-coreutils@gnu.org>, and it
will automatically be entered into the Coreutils bug tracker. Before
reporting bugs please read the FAQ. A very useful and often referenced
guide on how to write bug reports and ask good questions is the
document How To Ask Questions The Smart Way . You can browse previous
postings and search the bug-coreutils archive.
Distros that have already reverted this change:
Debian coreutils-8.25-2
Including consequently, presumably, Ubuntu and all of the hundreds of Debian-based and Ubuntu-based derivatives
Distros unaffected:
- openSUSE (already used -N)
"Any way to fix this without a recompile?"
Proponents would have you...
get back to the old format by adding -N to their ls alias
…on all of your installs, everywhere, for the remainder of eternity.
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short withls
what you see no longer is how it's stored. That feature should be optional, not the default.
– user86969
May 26 '16 at 13:19
|
show 18 more comments
Preface: While it may be quite satisfying to upvote an answer such as this and call it a day, please be assured that GNU developers do not care about SO answer votes, & that if you actually want to encourage them to change, you need to email them as this answer describes.
"Why is this happening?"
Several coreutils developers decided they knew better than decades of de facto standards.
"How do I stop it properly?"
http://www.gnu.org/software/coreutils/coreutils.html:
Bug Reports
If you think you have found a bug in Coreutils, then please send as
complete a bug report as possible to <bug-coreutils@gnu.org>, and it
will automatically be entered into the Coreutils bug tracker. Before
reporting bugs please read the FAQ. A very useful and often referenced
guide on how to write bug reports and ask good questions is the
document How To Ask Questions The Smart Way . You can browse previous
postings and search the bug-coreutils archive.
Distros that have already reverted this change:
Debian coreutils-8.25-2
Including consequently, presumably, Ubuntu and all of the hundreds of Debian-based and Ubuntu-based derivatives
Distros unaffected:
- openSUSE (already used -N)
"Any way to fix this without a recompile?"
Proponents would have you...
get back to the old format by adding -N to their ls alias
…on all of your installs, everywhere, for the remainder of eternity.
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short withls
what you see no longer is how it's stored. That feature should be optional, not the default.
– user86969
May 26 '16 at 13:19
|
show 18 more comments
Preface: While it may be quite satisfying to upvote an answer such as this and call it a day, please be assured that GNU developers do not care about SO answer votes, & that if you actually want to encourage them to change, you need to email them as this answer describes.
"Why is this happening?"
Several coreutils developers decided they knew better than decades of de facto standards.
"How do I stop it properly?"
http://www.gnu.org/software/coreutils/coreutils.html:
Bug Reports
If you think you have found a bug in Coreutils, then please send as
complete a bug report as possible to <bug-coreutils@gnu.org>, and it
will automatically be entered into the Coreutils bug tracker. Before
reporting bugs please read the FAQ. A very useful and often referenced
guide on how to write bug reports and ask good questions is the
document How To Ask Questions The Smart Way . You can browse previous
postings and search the bug-coreutils archive.
Distros that have already reverted this change:
Debian coreutils-8.25-2
Including consequently, presumably, Ubuntu and all of the hundreds of Debian-based and Ubuntu-based derivatives
Distros unaffected:
- openSUSE (already used -N)
"Any way to fix this without a recompile?"
Proponents would have you...
get back to the old format by adding -N to their ls alias
…on all of your installs, everywhere, for the remainder of eternity.
Preface: While it may be quite satisfying to upvote an answer such as this and call it a day, please be assured that GNU developers do not care about SO answer votes, & that if you actually want to encourage them to change, you need to email them as this answer describes.
"Why is this happening?"
Several coreutils developers decided they knew better than decades of de facto standards.
"How do I stop it properly?"
http://www.gnu.org/software/coreutils/coreutils.html:
Bug Reports
If you think you have found a bug in Coreutils, then please send as
complete a bug report as possible to <bug-coreutils@gnu.org>, and it
will automatically be entered into the Coreutils bug tracker. Before
reporting bugs please read the FAQ. A very useful and often referenced
guide on how to write bug reports and ask good questions is the
document How To Ask Questions The Smart Way . You can browse previous
postings and search the bug-coreutils archive.
Distros that have already reverted this change:
Debian coreutils-8.25-2
Including consequently, presumably, Ubuntu and all of the hundreds of Debian-based and Ubuntu-based derivatives
Distros unaffected:
- openSUSE (already used -N)
"Any way to fix this without a recompile?"
Proponents would have you...
get back to the old format by adding -N to their ls alias
…on all of your installs, everywhere, for the remainder of eternity.
edited Jan 27 '18 at 22:00
answered Feb 14 '16 at 5:45
Jan Kyu PeblikJan Kyu Peblik
1,408156
1,408156
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short withls
what you see no longer is how it's stored. That feature should be optional, not the default.
– user86969
May 26 '16 at 13:19
|
show 18 more comments
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short withls
what you see no longer is how it's stored. That feature should be optional, not the default.
– user86969
May 26 '16 at 13:19
15
15
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
The change was proposed on the mailing list and agreed by three coreutils maintainers to be a net benefit. We're entirely open to constructive arguments about this. This is open source after all, we don't mean to dictate, only to improve things. Please feel free to respond in the coreutils thread at lists.gnu.org/archive/html/coreutils/2016-02/msg00000.html (BTW the way, there was a constructive suggestion to improve on one of the aesthetic disadvantages mentioned there, by adding a space to improve alignment)
– Pádraig Brady
Feb 15 '16 at 20:46
26
26
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
@PádraigBrady Updated answer. Seeing loads of denial in your coreutils thread, though. The bottom line is you are creating more work for people, and you're doing it in the name of an OS that is a clone of an OS from 1970. If people want something different, they will opt into it.
– Jan Kyu Peblik
Feb 17 '16 at 22:21
38
38
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
@PádraigBrady This change has caused me annoyance and wasted several hours trying find a cause and a solution. I don't mean to be negative - I'm just sharing another persons viewpoint! Modifying core behaviour has huge implications..
– mafrosis
Mar 16 '16 at 16:15
44
44
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
As someone who's used *nix systems for 30 years, I find gratuitous changes like this to be quite annoying. They break long-standing scripts, for one thing. They also violate the Principle of Least Astonishment. "Opt-in" should've been the default here, as noted above.
– Brian Clapper
Apr 7 '16 at 0:01
23
23
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short with
ls
what you see no longer is how it's stored. That feature should be optional, not the default.– user86969
May 26 '16 at 13:19
@PádraigBrady That's still not the way to push such changes. It'd have been way more constructive to have that behaviour opt-in instead of active by default. It also falsely hints this is how file names are stored, in short with
ls
what you see no longer is how it's stored. That feature should be optional, not the default.– user86969
May 26 '16 at 13:19
|
show 18 more comments
You can chose quoting style:
ls --quoting-style=literal
The same as:
ls -N
or:
QUOTING_STYLE=literal ls
Make it an alias, or set export QUOTING_STYLE=literal
in your .bashrc
to achieve pre-8.25 behavior.
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
For pre-8.25 behavior, useexport QUOTING_STYLE=literal
in your bashrc.
– Lekensteyn
Jan 31 '16 at 11:07
1
or use-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.
– Wyatt8740
Jan 31 '16 at 15:12
1
@LSpice I have edited the post to useliteral
instead ofescape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting theescape
style).
– Lekensteyn
Feb 16 '16 at 10:31
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
|
show 9 more comments
You can chose quoting style:
ls --quoting-style=literal
The same as:
ls -N
or:
QUOTING_STYLE=literal ls
Make it an alias, or set export QUOTING_STYLE=literal
in your .bashrc
to achieve pre-8.25 behavior.
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
For pre-8.25 behavior, useexport QUOTING_STYLE=literal
in your bashrc.
– Lekensteyn
Jan 31 '16 at 11:07
1
or use-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.
– Wyatt8740
Jan 31 '16 at 15:12
1
@LSpice I have edited the post to useliteral
instead ofescape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting theescape
style).
– Lekensteyn
Feb 16 '16 at 10:31
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
|
show 9 more comments
You can chose quoting style:
ls --quoting-style=literal
The same as:
ls -N
or:
QUOTING_STYLE=literal ls
Make it an alias, or set export QUOTING_STYLE=literal
in your .bashrc
to achieve pre-8.25 behavior.
You can chose quoting style:
ls --quoting-style=literal
The same as:
ls -N
or:
QUOTING_STYLE=literal ls
Make it an alias, or set export QUOTING_STYLE=literal
in your .bashrc
to achieve pre-8.25 behavior.
edited Feb 16 '16 at 10:30
Lekensteyn
10.1k115289
10.1k115289
answered Jan 30 '16 at 7:40
cuonglmcuonglm
105k25209307
105k25209307
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
For pre-8.25 behavior, useexport QUOTING_STYLE=literal
in your bashrc.
– Lekensteyn
Jan 31 '16 at 11:07
1
or use-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.
– Wyatt8740
Jan 31 '16 at 15:12
1
@LSpice I have edited the post to useliteral
instead ofescape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting theescape
style).
– Lekensteyn
Feb 16 '16 at 10:31
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
|
show 9 more comments
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
For pre-8.25 behavior, useexport QUOTING_STYLE=literal
in your bashrc.
– Lekensteyn
Jan 31 '16 at 11:07
1
or use-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.
– Wyatt8740
Jan 31 '16 at 15:12
1
@LSpice I have edited the post to useliteral
instead ofescape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting theescape
style).
– Lekensteyn
Feb 16 '16 at 10:31
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
8
8
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
seems a bit weird I have to do that to get normal unix-y behavior. Also, I want the old default. I don't think escaping was the old default - I think it printed exactly what was actually there.
– Wyatt8740
Jan 30 '16 at 15:58
7
7
For pre-8.25 behavior, use
export QUOTING_STYLE=literal
in your bashrc.– Lekensteyn
Jan 31 '16 at 11:07
For pre-8.25 behavior, use
export QUOTING_STYLE=literal
in your bashrc.– Lekensteyn
Jan 31 '16 at 11:07
1
1
or use
-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.– Wyatt8740
Jan 31 '16 at 15:12
or use
-N
, it seems. I'm just compiling my own version since I already have a personal repository set up.– Wyatt8740
Jan 31 '16 at 15:12
1
1
@LSpice I have edited the post to use
literal
instead of escape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting the escape
style).– Lekensteyn
Feb 16 '16 at 10:31
@LSpice I have edited the post to use
literal
instead of escape
(I believe that @cuonglm just wanted to show how to change the style, not specifically targetting the escape
style).– Lekensteyn
Feb 16 '16 at 10:31
3
3
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
This answer deserves more upvotes. It straightly addresses what the questioner asked avoiding a bureaucratic answer. Indeed, the environment variable approach seems pretty elegant. (I personally prefer the new behavior as it favors a more efficient C&P action), yet, ls is clever enough to behave the old way when a redirection is used, so no harm to scripts that uses ls' output.
– Marcelo
Nov 24 '17 at 1:17
|
show 9 more comments
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn't break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding -N to their ls alias
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
@PádraigBrady So, are you going to keepls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.
– Chris Warrick
Apr 24 '16 at 18:39
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
|
show 27 more comments
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn't break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding -N to their ls alias
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
@PádraigBrady So, are you going to keepls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.
– Chris Warrick
Apr 24 '16 at 18:39
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
|
show 27 more comments
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn't break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding -N to their ls alias
A few points about the change.
- It was introduced in coreutils v8.25, and alignment improved in v8.26
- It only happens when outputting to terminals so doesn't break scripts
- It disambiguates the output for users for files containing whitespace
- It sanitizes output so it is safe to copy and paste
- Output is now always valid to copy and paste back to shell
- Users can get back to the old format by adding -N to their ls alias
edited Mar 15 '17 at 18:33
answered Jan 30 '16 at 8:54
Pádraig BradyPádraig Brady
1,8031211
1,8031211
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
@PádraigBrady So, are you going to keepls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.
– Chris Warrick
Apr 24 '16 at 18:39
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
|
show 27 more comments
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
@PádraigBrady So, are you going to keepls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.
– Chris Warrick
Apr 24 '16 at 18:39
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
7
7
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
my last example isn't ambiguous? Perhaps not - but it's certainly confusing and takes more time to decipher. I think it's an awful change (no offense intended to you). Thanks for the alias tip though.
– Wyatt8740
Jan 30 '16 at 15:58
26
26
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
Note: this change was introduced in coreutils 8.25 (commit, authored by the same Pádraig as this post). Personally I think that this behavior is suboptimal, it breaks alignment whenever a space occurs in a filename.
– Lekensteyn
Jan 31 '16 at 11:01
8
8
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
my apologies - apparently you are safely shell-quoting the shell-quotes at least. i still do not like it. the options are fine - but altering the very well-specified default behavior of a decades-old unix core utility in such a way that diminishes its veracity can only be a bad idea.
– mikeserv
Feb 5 '16 at 17:03
11
11
@PádraigBrady So, are you going to keep
ls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.– Chris Warrick
Apr 24 '16 at 18:39
@PádraigBrady So, are you going to keep
ls
broken? Look at all those arguments against your change. Nobody wants it. Perhaps it’s time to apologize to the world and undo it.– Chris Warrick
Apr 24 '16 at 18:39
5
5
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
@PádraigBrady So in spite of the many people who have explained how this is wrong, broken, etc, you still won't revert this so that the default is unchanged? Contrary to your belief, this change confuses not disambiguates. Suggesting that people set an environment variable or alias is asinine, at best.
– Mark
Jan 14 '17 at 3:11
|
show 27 more comments
protected by don_crissti Jul 4 '16 at 18:20
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
16
Yet another reason why not parser the
ls
command.– jimmij
Jan 30 '16 at 7:27
10
It looks odd but if it's only enabled when printing to a terminal it makes sense. You can see clearly that you have a file 'test 1.txt' rather than a file 'test' and another '1.txt'. Try
ls | cat
and see if it goes away. If I had a time machine, I would go back to Bell Labs ~1970 and try to convince Ken Thompson that allowing space in file and directory names is a bad idea. :-P– Bjorn Munch
Jan 30 '16 at 9:06
5
When I first saw this, I freaked out, thinking that one of my scripts had gone awry and renamed all my files to
'*'
. I guess I'll go around addingls
aliases to all my machines to get rid of it...– Limited Atonement
Feb 12 '16 at 18:57
14
@LimitedAtonement, as pointed out by Lekensteyn, you can do this with an environment variable
QUOTING_STYLE=literal
rather than an alias. (I guess it's a matter of taste, but I prefer the variable.)– LSpice
Feb 15 '16 at 23:15
3
@LimitedAtonement, sure, but fixing one environment variable will cover all the aliases automatically, and then you can always add get the new default (or other) behaviour by overriding the environment variable with
l --quoting=shell-escape
(or other quoting style).– LSpice
Feb 16 '16 at 3:35