--- ../emacs/lisp/ls-lisp.el 2021-06-06 23:11:38.317648694 +0200 +++ ./ls-lisp.el 2021-07-15 11:08:02.233434792 +0200 @@ -291,6 +291,10 @@ ;; Remove --dired switch (if (string-match "--dired " switches) (setq switches (replace-match "" nil nil switches))) + ;; Convert --group-directories-first to `y' (`y' and `Y' does not seem to + ;; be used by any ls prog currently so we can per-use it here) + (if (string-match "--group-directories-first " switches) + (setq switches (replace-match "y" nil nil switches))) ;; Convert SWITCHES to a list of characters. (setq switches (delete ?\ (delete ?- (append switches nil)))) ;; Sometimes we get ".../foo*/" as FILE. While the shell and @@ -682,7 +686,7 @@ (ding) (sit-for 2)))) ; to show user the message! (if (memq ?F switches) ; classify switch (setq file-alist (mapcar 'ls-lisp-classify file-alist))) - (if ls-lisp-dirs-first + (if (or ls-lisp-dirs-first (memq ?y switches)) ;; Re-sort directories first, without otherwise changing the ;; ordering, and reverse whole list. cadr of each element of ;; `file-alist' is t for directory, string (name linked to) for