diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-09-23 09:09:09 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2013-09-23 09:09:09 +0200 |
commit | e0afd2ed23062d20f10797aefc1cb2b52eb0fcdc (patch) | |
tree | 9d141e9baed4fdd7548e6a91b3cbff92b5c70f7f /helm-eshell.el | |
parent | dcbd70e9b2226be7e0059b264002810028355a49 (diff) |
* helm-eshell.el (helm-esh-get-candidates): Don't add entry when completion is not file related.
Diffstat (limited to 'helm-eshell.el')
-rw-r--r-- | helm-eshell.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/helm-eshell.el b/helm-eshell.el index 5da96588..3f46f869 100644 --- a/helm-eshell.el +++ b/helm-eshell.el @@ -122,6 +122,11 @@ The function that call this should set `helm-ec-target' to thing at point." (if (and (stringp exp-entry) (not (string= exp-entry "")) (file-exists-p exp-entry) + ;; If the car of completion list is + ;; an executable, probably we are in + ;; command completion, so don't add a + ;; possible file related entry here. + (and ls (not (executable-find (car ls)))) (not (file-equal-p exp-entry pcomplete-stub))) (append (list exp-entry) (remove entry ls)) ls)))))) |