Emulate the Unix ls
command in Emacs Lisp because the one in MacOS:
(with-eval-after-load 'dired (require 'ls-lisp))
(with-eval-after-load 'ls-lisp (setq ls-lisp-use-insert-directory-program nil dired-listing-switches (string-join '("--all" "--group-directories-first" "--human-readable" "--no-group"))))
Hide MacOS garbage files quietly.
(with-eval-after-load 'dired (setq dired-omit-files "^\\.DS_Store\\|\\.localized$" dired-omit-verbose nil) (add-hook 'dired-mode-hook #'dired-omit-mode))