Add -v switch to dired-listing-switches (for GNU ls)
Natural sorting of ls file list (when it comes to numbers/versions in file names).
This commit is contained in:
parent
c690ed600a
commit
b625a54db6
1 changed files with 3 additions and 3 deletions
|
@ -22,15 +22,15 @@
|
||||||
:slot 20 :size 0.8 :select t :quit nil :ttl 0)
|
:slot 20 :size 0.8 :select t :quit nil :ttl 0)
|
||||||
(set-evil-initial-state! 'image-dired-display-image-mode 'emacs)
|
(set-evil-initial-state! 'image-dired-display-image-mode 'emacs)
|
||||||
|
|
||||||
(let ((args (list "-ahl" "--group-directories-first")))
|
(let ((args (list "-ahl" "-v" "--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
|
||||||
;; when not using GNU ls.
|
;; when not using GNU ls.
|
||||||
(if-let (gls (executable-find "gls"))
|
(if-let (gls (executable-find "gls"))
|
||||||
(setq insert-directory-program gls)
|
(setq insert-directory-program gls)
|
||||||
;; BSD ls doesn't support --group-directories-first
|
;; BSD ls doesn't support -v or --group-directories-first
|
||||||
(setq args (delete "--group-directories-first" args))))
|
(setq args (car args))))
|
||||||
(setq dired-listing-switches (string-join args " "))
|
(setq dired-listing-switches (string-join args " "))
|
||||||
|
|
||||||
(add-hook! 'dired-mode-hook
|
(add-hook! 'dired-mode-hook
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue