summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-dirs.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-dirs.el')
-rw-r--r--lisp/eshell/em-dirs.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 0000cae5adf..02556661b1b 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -319,7 +319,7 @@ in the minibuffer:
(before translate-multiple-dots
(filename &optional directory) activate)
(setq filename (eshell-expand-multiple-dots filename)))"
- (while (string-match "\\.\\.\\(\\.+\\)" path)
+ (while (string-match "\\(?:^\\|/\\)\\.\\.\\(\\.+\\)\\(?:$\\|/\\)" path)
(let* ((extra-dots (match-string 1 path))
(len (length extra-dots))
replace-text)