[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 42c0686d618: ; Fix an edge case with Eshell globs when the direct
From: |
Jim Porter |
Subject: |
master 42c0686d618: ; Fix an edge case with Eshell globs when the directory part is quoted |
Date: |
Thu, 9 May 2024 20:17:40 -0400 (EDT) |
branch: master
commit 42c0686d6180a7ca1b89f7bde2f9fd17d6a67217
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
; Fix an edge case with Eshell globs when the directory part is quoted
* lisp/eshell/esh-util.el (eshell-split-filename): Escaping shouldn't
matter for splitting the name (no other shells handle it like this).
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/convert/quoted-start-directory): New test.
---
lisp/eshell/esh-util.el | 3 +--
test/lisp/eshell/em-glob-tests.el | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 129134814e3..47645231b75 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -458,8 +458,7 @@ Prepend remote identification of `default-directory', if
any."
(string-prefix-p "//" filename))
(setq index 2))
(while (< index len)
- (when (and (eq (aref filename index) ?/)
- (not (get-text-property index 'escaped filename)))
+ (when (eq (aref filename index) ?/)
(push (if (= curr-start index) "/"
(substring filename curr-start (1+ index)))
parts)
diff --git a/test/lisp/eshell/em-glob-tests.el
b/test/lisp/eshell/em-glob-tests.el
index 40cdfd1a676..d7d8f59eda0 100644
--- a/test/lisp/eshell/em-glob-tests.el
+++ b/test/lisp/eshell/em-glob-tests.el
@@ -146,6 +146,12 @@ value of `eshell-glob-splice-results'."
`(,(format "%s/some/where/" remote)
(("\\`.*\\.el\\'" . "\\`\\.")) nil)))))
+(ert-deftest em-glob-test/convert/quoted-start-directory ()
+ "Test converting a glob starting in a quoted directory name."
+ (should (equal (eshell-glob-convert
+ (concat (eshell-escape-arg "some where/") "*.el"))
+ '("./some where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
+
;; Glob matching
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 42c0686d618: ; Fix an edge case with Eshell globs when the directory part is quoted,
Jim Porter <=