Hi Pádraig,
Post by Pádraig Brady- It only happens when outputting to terminals
This means if you use "ls -1 | somescript" the script will
not see the quoting style. Don't you think that this is
inconsistent, not to mention that a script would benefit
much more from this quoting style than a human?
Post by Pádraig Brady- It disambiguates the output for users
This means that the user has to count '\' and "'" in the output
of ls to get the "real" filename.
Post by Pádraig Brady- Output can be pasted back in the shell for further processing
This means that it useful only on a graphic terminal, for people
using a mouse, but it affects all users using "ls"
Post by Pádraig Brady- Users can get back to the old format by adding -N to their ls alias
Or they can use busybox, Solaris, AIX, HP-UX and tons of others.
Post by Pádraig Brady- Slightly misaligns -l output when some files have spaces
I cannot express *how* annoying this is, e.g. if you are using
"ls -al" looking for a file or directory. The output appears to
be completely messed up, since the "." and "'" at the beginning
of a file name are very hard to distinguish, esp. in a long
listing. It appears to be unsorted. Artificial sample:
% export LANG=en_US.UTF-8
% ls -al
total 164
drwxrwxrwt 13 root root 4096 Feb 2 06:55 .
drwxr-xr-x 43 root root 4096 Jan 14 12:34 ..
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 a
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 .a
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 '.a b'
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 .a.b
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 '.a'\''b'
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 'a b'
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 a.b
- -rw-r--r-- 1 harri harri 0 Feb 2 06:55 'a'\''b'
Post by Pádraig Brady- Produces longer output for file names with single quotes
This means that some file names appear to have a different length,
but they don't.
Post by Pádraig BradySo that's 2 functional advantages over 2 aesthetic disadvantages. Given the advantages especially for new users and the complications of producing shell quoted file names oneself, we chose the new default.
Sorry, but I don't see the functional advantage, since the
new quoting style is not used if you are using a pipe.
You get it only on terminal, writing directly to the user.
The "aesthetic disadvantage" exists and is underestimated here,
since the main purpose of ls is to produce readable output. Now
the user needs some integrated quoting filter to translate the
shown directory elements back to their real names. I doubt that
new users will benefit from this.
Don't get me wrong, I have no problem with the new quoting style.
I don't see the advantage of making it the default.
Regards
Harri