refactor: use when statements for OS-specific directory program settings

This commit is contained in:
lemyx (aider) 2024-12-29 10:45:52 +08:00
parent 455d8b6c4a
commit 8012a221c2

View File

@ -17,8 +17,11 @@
;; show human readable file size
;; https://github.com/d12frosted/homebrew-emacs-plus/issues/383#issuecomment-899157143
(setq insert-directory-program (if (eq system-type 'darwin) "gls" "ls")
dired-use-ls-dired t)
(when (eq system-type 'darwin)
(setq insert-directory-program "gls"))
(when (eq system-type 'gnu/linux)
(setq insert-directory-program "ls"))
(setq dired-use-ls-dired t)
(setq dired-listing-switches "-al --group-directories-first")
(use-package nerd-icons-dired