Variable: dired-use-ls-dired
dired-use-ls-dired is a customizable variable defined in dired.el.gz.
Value
unspecified
Documentation
Non-nil means Dired should pass the "--dired" option to "ls".
If nil, don't pass "--dired" to "ls".
The special value of unspecified means to check whether
insert-directory-program supports the "--dired" option, and save
the result in this variable.
This is performed the first time dired-insert-directory
invokes insert-directory-program.
Note that if you set this option to nil, either through choice or
because your "ls" program does not support "--dired", Dired
will fail to parse some "unusual" file names, e.g. those with leading
spaces. You might want to install ls from GNU Coreutils, which does
support this option. Alternatively, you might want to use Emacs's
own emulation of "ls", by using:
(setq ls-lisp-use-insert-directory-program nil)
(require 'ls-lisp)
This is used by default on MS Windows, which does not have an "ls" program.
Note that ls-lisp does not support as many options as GNU ls, though.
For more details, see Info node (emacs)ls in Lisp.
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defcustom dired-use-ls-dired 'unspecified
"Non-nil means Dired should pass the \"--dired\" option to \"ls\".
If nil, don't pass \"--dired\" to \"ls\".
The special value of `unspecified' means to check whether
`insert-directory-program' supports the \"--dired\" option, and save
the result in this variable.
This is performed the first time `dired-insert-directory'
invokes `insert-directory-program'.
Note that if you set this option to nil, either through choice or
because your \"ls\" program does not support \"--dired\", Dired
will fail to parse some \"unusual\" file names, e.g. those with leading
spaces. You might want to install ls from GNU Coreutils, which does
support this option. Alternatively, you might want to use Emacs's
own emulation of \"ls\", by using:
(setq ls-lisp-use-insert-directory-program nil)
(require \\='ls-lisp)
This is used by default on MS Windows, which does not have an \"ls\" program.
Note that `ls-lisp' does not support as many options as GNU ls, though.
For more details, see Info node `(emacs)ls in Lisp'."
:group 'dired
:type '(choice (const :tag
"Use --dired only if `ls' supports it" unspecified)
(const :tag "Do not use --dired" nil)
(other :tag "Always use --dired" t)))