]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix file-name detection in Dired under -F
authorEli Zaretskii <eliz@gnu.org>
Fri, 5 Jul 2024 10:58:11 +0000 (13:58 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 7 Jul 2024 13:16:54 +0000 (15:16 +0200)
* lisp/files.el (insert-directory-clean): Support all the symbols
appended to file names by the -F/--classify option of 'ls'.  See
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg00366.html
for the details.

(cherry picked from commit d190cb0e886f3d748ddbb8bf915c19149d00c0c4)

lisp/files.el

index 79bc5c1c083504658623b0ba34eb553677f7b26b..74a9c62c6671804cb7a17669cf895a42348e60d0 100644 (file)
@@ -8134,8 +8134,8 @@ Valid wildcards are `*', `?', `[abc]' and `[a-z]'."
                  (end (insert-directory-adj-pos
                        (+ beg (read (current-buffer)))
                        error-lines)))
-             (if (memq (char-after end) '(?\n ?\s))
-                 ;; End is followed by \n or by " -> ".
+             (if (memq (char-after end) '(?\n ?\s ?/ ?* ?@ ?% ?= ?|))
+                 ;; End is followed by \n or by output of -F.
                  (put-text-property start end 'dired-filename t)
                ;; It seems that we can't trust ls's output as to
                ;; byte positions of filenames.