-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Pádraig,
On 02/01/16 17:07, Pádraig Brady wrote: > On 31/01/16 06:48, Harald Dunkel wrote: > > The reasons we changed the default was: > > - 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? > - 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. > - 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" > - 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. > I see some disadvantages as: > > - 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' : > - 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. > So 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWsEnqAAoJEAqeKp5m04HL5uUH/i7sydXFLjoqK5Yxj1KZjNlQ DJlTP9XJLeZDbvEaHY5PTrQJAVtd0qM2LT8Zu1K0VvAHudutdpcplNNOaTCIho66 nLjJQTVlogwlw+Z1INyLXukQ9Pt0qf777oS1gDjqDRx/HQYXENLhKep6Gm0G5VT4 nwbnmS5tx7H1feU0b1yys2OAXrWx4cuHy1oOqRbljNebjOf/HtAFjuoxVp9351+G uYizoTdQgLAjMuQAdjZTFQ0DmQtayZkrKEjydfCV7a7ykD1/ojPfAJYsHkw874m4 nJXJTWmnzLv/tmZZ9bRVYJSCbp69O4uxYPDAlRPzpKC9rDdl++E88sQ48AKfpGM= =53mB -----END PGP SIGNATURE-----