* 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.
(cherry picked from commit
42c0686d6180a7ca1b89f7bde2f9fd17d6a67217)
(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)
`(,(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))))
+
\f
;; Glob matching