diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-08-14 07:39:28 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-08-14 07:43:31 +0200 |
commit | c1652c0a09e183aee1e1d38f340706d1072ea426 (patch) | |
tree | c444a30e8341b229fb33519290fcbbb2d6e25cf0 /helm-eshell.el | |
parent | 9fd5760179b7fc058b9ecbe1a8edb5fabbb90497 (diff) |
Restore dot when quitting in eshell (#1832)
* helm-eshell.el (helm-esh-pcomplete): Do it.
Diffstat (limited to 'helm-eshell.el')
-rw-r--r-- | helm-eshell.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/helm-eshell.el b/helm-eshell.el index d283874f..be21f786 100644 --- a/helm-eshell.el +++ b/helm-eshell.el @@ -224,7 +224,8 @@ The function that call this should set `helm-ec-target' to thing at point." (users-comp (string= target "~")) (first (car args)) ; Maybe lisp delimiter "(". last ; Will be the last but parsed by pcomplete. - del-space) + del-space + del-dot) (setq helm-ec-target (or target " ") end (point) ;; Reset beg for `with-helm-show-completion'. @@ -234,9 +235,8 @@ The function that call this should set `helm-ec-target' to thing at point." (progn (insert " ") (setq del-space t) (point)))) (when (string-match "\\`[~.]*.*/[.]\\'" target) ;; Fix completion on - ;; "~/.", "~/[...]/.", and "../.". Note that removed dot is not - ;; restored if nothing found or when quitting, FIXIT. - (delete-char -1) + ;; "~/.", "~/[...]/.", and "../." + (delete-char -1) (setq del-dot t) (setq helm-ec-target (substring helm-ec-target 0 (1- (length helm-ec-target))))) (cond ((eq first ?\() (helm-lisp-completion-or-file-name-at-point)) @@ -283,6 +283,7 @@ The function that call this should set `helm-ec-target' to thing at point." ;; users instead of only on ;; current $HOME (#1832). (unless users-comp last))) + (and del-dot (insert ".")) ;; A space is needed to have completion, remove ;; it when nothing found. (and del-space (looking-back "\\s-" (1- (point))) |