summaryrefslogtreecommitdiff
path: root/helm-mode.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2020-01-03 09:12:16 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2020-01-03 09:12:16 +0100
commit8ca7ff9208e99853ce2b043f94863d56d4f4e46c (patch)
treea5a021ef46753c09a0b7061fcabb1eb2a7f75f4b /helm-mode.el
parent7ba50746bf4bb00848602f8d8cdf473fdb84cda2 (diff)
Fix completion in *shell modes (#2261)
when helm style is alone. Needs bash-completion disabled as well to reproduce bug in shell-mode, eshell is not affected by bash-completion. * helm-mode.el (helm-completion--multi-all-completions-1): Do it.
Diffstat (limited to 'helm-mode.el')
-rw-r--r--helm-mode.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/helm-mode.el b/helm-mode.el
index 36e8a186..5c4416cb 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1520,7 +1520,11 @@ Actually do nothing."
;; returns relative paths to initial pattern (eshell).
(let* ((split (helm-mm-split-pattern string))
(fpat (or (car split) ""))
- (all (and (or (cdr split) (string-match " \\'" string)
+ (all (and (or (cdr split)
+ (and (not (cdr split))
+ ;; Kickin when STRING is a simple string.
+ (not (string= fpat "")))
+ (string-match " \\'" string)
(string= string ""))
(not (string-match "\\`!" fpat))
;; all-completions should return nil if FPAT is a
@@ -1533,7 +1537,8 @@ Actually do nothing."
;; Returns the part of STRING after space
;; e.g. "foo bar baz" => "bar baz".
(substring string (1+ it)))))
- (if (equal pattern "") ; e.g. STRING == "foo ".
+ (if (or (and all (not (cdr split)))
+ (equal pattern "")) ; e.g. STRING == "foo ".
all
(all-completions "" (or all collection)
(lambda (x &optional _y)