same base name that belong to different projects by using the provided
transform function 'project-uniquify-dirname-transform'.
+** 'insert-directory-program' is now a defcustom.
+
+** 'insert-directory-program' prefers "gls" on *BSD and macOS.
+On *BSD and macOS systems, this user option now defaults to the "gls"
+executable, if it exists. This should remove the need to change its
+value when installing GNU coreutils using something like ports or
+Homebrew.
+
** cl-print
*** You can expand the "..." truncation everywhere.
pattern))))
-(defvar insert-directory-program (purecopy "ls")
+(defcustom insert-directory-program
+ (if (and (memq system-type '(berkeley-unix darwin))
+ (executable-find "gls"))
+ (purecopy "gls")
+ (purecopy "ls"))
"Absolute or relative name of the `ls'-like program.
This is used by `insert-directory' and `dired-insert-directory'
-\(thus, also by `dired').")
+(thus, also by `dired'). For Dired, this should ideally point to
+GNU ls, or another version of ls that supports the \"--dired\"
+flag. See `dired-use-ls-dired'.
+
+On GNU/Linux and other capable systems, the default is \"ls\".
+
+On *BSD and macOS systems, the default \"ls\" does not support
+the \"--dired\" flag. Therefore, the default is to use the
+\"gls\" executable on such machines, if it exists. This means
+that there should normally be no need to customize this when
+installing GNU coreutils using something like ports or Homebrew."
+ :group 'dired
+ :type 'string
+ :initialize #'custom-initialize-delay
+ :version "30.1")
(defcustom directory-free-space-program (purecopy "df")
"Program to get the amount of free space on a file system.