Remove --group-directories-first arg for bsd ls
This commit is contained in:
parent
cc1aad8f2e
commit
c07f43bba3
1 changed files with 12 additions and 11 deletions
|
@ -17,8 +17,7 @@
|
||||||
image-dired-temp-image-file (concat image-dired-dir "temp-image")
|
image-dired-temp-image-file (concat image-dired-dir "temp-image")
|
||||||
image-dired-temp-rotate-image-file (concat image-dired-dir "temp-rotate-image"))
|
image-dired-temp-rotate-image-file (concat image-dired-dir "temp-rotate-image"))
|
||||||
:config
|
:config
|
||||||
(setq dired-listing-switches "-aBhl --group-directories-first")
|
(let ((args (list "-aBhl" "--group-directories-first")))
|
||||||
|
|
||||||
(when IS-BSD
|
(when IS-BSD
|
||||||
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
|
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
|
||||||
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning
|
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning
|
||||||
|
@ -27,7 +26,9 @@
|
||||||
;; `exec-path'
|
;; `exec-path'
|
||||||
(if-let* ((gls (executable-find "gls")))
|
(if-let* ((gls (executable-find "gls")))
|
||||||
(setq insert-directory-program gls)
|
(setq insert-directory-program gls)
|
||||||
|
(setq args (delete "--group-directories-first" args))
|
||||||
(message "Cannot find `gls` (GNU ls). Install coreutils via your system package manager")))
|
(message "Cannot find `gls` (GNU ls). Install coreutils via your system package manager")))
|
||||||
|
(setq dired-listing-switches (string-join args " ")))
|
||||||
|
|
||||||
(defun +dired|sort-directories-first ()
|
(defun +dired|sort-directories-first ()
|
||||||
"List directories first in dired buffers."
|
"List directories first in dired buffers."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue