summaryrefslogtreecommitdiff
path: root/helm-eshell.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-13 20:20:02 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-13 20:23:18 +0200
commita4bb0d8fdde7b76428a7249dab701029c9412a6a (patch)
tree9eb5f6642897c9c667ac362507e39c5bb9f3cd99 /helm-eshell.el
parent310c30b8500256081f76dee4bbf2131265860afb (diff)
Add comment for eshell completion (#1832)
* helm-eshell.el (helm-esh-pcomplete): Do it.
Diffstat (limited to 'helm-eshell.el')
-rw-r--r--helm-eshell.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/helm-eshell.el b/helm-eshell.el
index 56750ed0..ca7e2909 100644
--- a/helm-eshell.el
+++ b/helm-eshell.el
@@ -205,11 +205,6 @@ The function that call this should set `helm-ec-target' to thing at point."
(defvar helm-eshell--delete-suffix-flag nil)
-;; FIXME: (These are emacs bugs we can work around)
-;; [X] ls ..<TAB> should complete to ../ (same for .<TAB>)
-;; [ ] cd ~/.<TAB> should complete to all hidden files under $HOME
-;; (emacs bug#28064).
-
;;;###autoload
(defun helm-esh-pcomplete ()
"Preconfigured helm to provide helm completion in eshell."
@@ -237,7 +232,9 @@ The function that call this should set `helm-ec-target' to thing at point."
(- end (length target)))
;; Nothing at point.
(progn (insert " ") (setq del-space t) (point))))
- (when (string-match "\\`[~]/.*[.]\\'" target)
+ (when (string-match "\\`[~.]*/.*[.]\\'" target)
+ ;; Fix completion on
+ ;; "~/.", "~/[...]/.", and "../."
(delete-char -1)
(setq helm-ec-target (substring helm-ec-target 0 (1- (length helm-ec-target)))))
(cond ((eq first ?\()
@@ -273,7 +270,9 @@ The function that call this should set `helm-ec-target' to thing at point."
(file-name-directory last)
(file-directory-p it))))
(if (and (file-directory-p last)
- (string-match "\\`[~]/.*[.]\\'" target))
+ (string-match "\\`[~.]*/.*[.]\\'" target))
+ ;; Fix completion on
+ ;; "~/.", "~/[...]/.", and "../."
(concat (helm-basedir (file-name-as-directory last))
(regexp-quote (helm-basename target)))
(expand-file-name last))