[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c71b718: Support options with embedded whitespace i
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master c71b718: Support options with embedded whitespace in 'dired-listing-switches' |
Date: |
Sat, 4 Feb 2017 10:04:22 +0000 (UTC) |
branch: master
commit c71b718be86bdda7b51c8ea0da30aa896a7833fe
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Support options with embedded whitespace in 'dired-listing-switches'
* lisp/dired.el (dired-listing-switches): Document how to quote
options with embedded whitespace.
* lisp/files.el (insert-directory): Use split-string-and-unquote
to support dired-listing-switches that specify command-line
options with embedded spaces. (Bug#25485)
---
lisp/dired.el | 4 ++++
lisp/files.el | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index 350f6a7..2733372 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -59,6 +59,10 @@
May contain all other options that don't contradict `-l';
may contain even `F', `b', `i' and `s'. See also the variable
`dired-ls-F-marks-symlinks' concerning the `F' switch.
+Options that include embedded whitespace must be quoted
+like this: \\\"--option=value with spaces\\\"; you can use
+`combine-and-quote-strings' to produce the correct quoting of
+each option.
On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp,
some of the `ls' switches are not supported; see the doc string of
`insert-directory' in `ls-lisp.el' for more details."
diff --git a/lisp/files.el b/lisp/files.el
index 2833ec5..03d6df4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6582,7 +6582,7 @@ normally equivalent short `-D' option is just passed on to
(unless (equal switches "")
;; Split the switches at any spaces so we can
;; pass separate options as separate args.
- (split-string switches)))
+ (split-string-and-unquote switches)))
;; Avoid lossage if FILE starts with `-'.
'("--")
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master c71b718: Support options with embedded whitespace in 'dired-listing-switches',
Eli Zaretskii <=