summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-cmpl.el4
-rw-r--r--lisp/eshell/esh-ext.el4
-rw-r--r--lisp/eshell/esh-util.el8
3 files changed, 10 insertions, 6 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index e3bfd8d9d48..8f6c6781b9c 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -409,13 +409,11 @@ to writing a completion function."
(setq filename (substring filename 1)
pcomplete-stub filename
glob-name t))
- (let* ((paths (eshell-parse-colon-path eshell-path-env))
+ (let* ((paths (eshell-get-path))
(cwd (file-name-as-directory
(expand-file-name default-directory)))
(path "") (comps-in-path ())
(file "") (filepath "") (completions ()))
- (if (eshell-under-windows-p)
- (push "." paths))
;; Go thru each path in the search path, finding completions.
(while paths
(setq path (file-name-as-directory
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index 978fc55c4de..1856d2bd190 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -74,10 +74,8 @@ but Eshell will be able to understand
"Search the environment path for NAME."
(if (file-name-absolute-p name)
name
- (let ((list (eshell-parse-colon-path eshell-path-env))
+ (let ((list (eshell-get-path))
suffixes n1 n2 file)
- (if (eshell-under-windows-p)
- (push "." list))
(while list
(setq n1 (concat (car list) name))
(setq suffixes eshell-binary-suffixes)
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 6f355c70a42..633bd02d2d2 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -232,6 +232,14 @@ It might be different from \(getenv \"PATH\"), when
`default-directory' points to a remote host.")
(make-variable-buffer-local 'eshell-path-env)
+(defun eshell-get-path ()
+ "Return $PATH as list.
+Add the current directory on windows."
+ (eshell-parse-colon-path
+ (if (eshell-under-windows-p)
+ (concat "." path-separator eshell-path-env)
+ eshell-path-env)))
+
(defun eshell-parse-colon-path (path-env)
"Split string with `parse-colon-path'.
Prepend remote identification of `default-directory', if any."