mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Fix support of listing switches with whitespace in Dired
* lisp/dired.el (dired-sort-by-date-regexp) (dired-sort-by-name-regexp): Allow quoted arguments with embedded whitespace, per the doc string of 'dired-listing-switches'. (Bug#80200)
This commit is contained in:
parent
e1d65b3c22
commit
f800f2300b
1 changed files with 6 additions and 2 deletions
|
|
@ -5038,12 +5038,16 @@ format, use `\\[universal-argument] \\[dired]'.")
|
|||
;; `dired-ls-sorting-switches' after -t overrides -t.
|
||||
"[^ " dired-ls-sorting-switches "]*"
|
||||
"\\(\\(\\`\\| +\\)\\(--[^ ]+\\|-[^- t"
|
||||
dired-ls-sorting-switches "]+\\)\\)* *$")
|
||||
dired-ls-sorting-switches "]+\\|"
|
||||
;; Allow quoted strings
|
||||
"\"[^\"]*\"\\)\\)* *$")
|
||||
"Regexp recognized by Dired to set `by date' mode.")
|
||||
|
||||
(defvar dired-sort-by-name-regexp
|
||||
(concat "\\`\\(\\(\\`\\| +\\)\\(--[^ ]+\\|"
|
||||
"-[^- t" dired-ls-sorting-switches "]+\\)\\)* *$")
|
||||
"-[^- t" dired-ls-sorting-switches "]+[^- tSXU]+\\|"
|
||||
;; Allow quoted strings
|
||||
"\"[^\"]*\"\\)\\)* *$")
|
||||
"Regexp recognized by Dired to set `by name' mode.")
|
||||
|
||||
(defvar dired-sort-inhibit nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue