summaryrefslogtreecommitdiff
path: root/helm-eshell.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-11 14:40:23 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-11 14:40:23 +0200
commitaecf4c62a50df70b3dedc319a0900972250b0638 (patch)
tree84db13cebd100ebc06d10861d41bb25e85f2d6d2 /helm-eshell.el
parent5b6aa86eb68ce7a844f9e65d7aa7f31fdc1024ba (diff)
No space at end of eshell completion after a directory (#1832)
* helm-eshell.el (helm-esh-pcomplete): Do it.
Diffstat (limited to 'helm-eshell.el')
-rw-r--r--helm-eshell.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/helm-eshell.el b/helm-eshell.el
index c72e2612..8b7ea62c 100644
--- a/helm-eshell.el
+++ b/helm-eshell.el
@@ -244,8 +244,8 @@ The function that call this should set `helm-ec-target' to thing at point."
"\\`\\*" ""
(car (last (ignore-errors
(pcomplete-parse-arguments))))))
+ (add-hook 'helm-quit-hook 'helm-eshell--delete-space)
(with-helm-show-completion beg end
- (add-hook 'helm-quit-hook 'helm-eshell--delete-space)
(unwind-protect
(or (helm :sources (helm-make-source "Eshell completions" 'helm-esh-source
:fuzzy-match helm-eshell-fuzzy-match)
@@ -276,7 +276,8 @@ The function that call this should set `helm-ec-target' to thing at point."
;; space is added when point is just after
;; previous completion and there is there no
;; more completion, see issue #1832.
- (unless helm-eshell--delete-space-flag
+ (unless (or helm-eshell--delete-space-flag
+ (looking-back "/\\'" (1- (point))))
(insert " ")))
(remove-hook 'helm-quit-hook 'helm-eshell--delete-space)
(setq helm-eshell--delete-space-flag nil)))))))