coreutils
[Top][All Lists]
Advanced

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

Feedback: ls


From: David Mooter
Subject: Feedback: ls
Date: Sat, 25 Apr 2020 16:39:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

My recent Linux upgrade got me the version of ls that defaults to outputting quotes for files names:
https://www.gnu.org/software/coreutils/quotes.html

My feedback is that this should be off by default and require an opt in. The purpose of ls when on standard out is for the human eye to read the file names. The quotes clutter the screen and make it harder for the eye to visually scan. It also creates inconsistent visual display for the eye and brain to process. For some files the all of the characters I see on the screen represent the file name; for others some of the characters (the quotes) do not.

The benefits cited in the above link are outweight by the visual confusion the produce.

 * The output is /not/ unambiguous. As noted above, how the brain needs
   to process the characters it sees varies from file to file,
   depending on if ls put quotes there or not.
 * The copy/paste benefit is hardly a benefit. The vast majority of
   files are filled in with TAB completion. In cases where I can't use
   TAB completion, it's simple enough to type a a quote before and
   after hitting the paste option.

This feature should be kept, but it should be an opt-in feature, not the default. Yes, it can be turned off. But defaults should represent the principle of least astonishment and provide the most value for the intended purpose of the program. The primary purpose of ls on standard out is to produce human-readable content. Thus ls has been changed to make copy/paste mildly easier in a few rare cases at the expense of serving its primary purpose.

Thanks,

--
David Mooter.



reply via email to

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