term/eshell: integrate company + pcomplete

This commit is contained in:
Henrik Lissner 2019-10-22 03:55:13 -04:00
parent bf46a197a0
commit 422c61a02a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 73 additions and 2 deletions

View file

@ -175,7 +175,13 @@ Once the eshell process is killed, the previous frame layout is restored."
bottom. This ties pcomplete into ivy or helm, if they are enabled."
(interactive)
(require 'pcomplete)
(ignore-errors (pcomplete-std-complete)))
(if (and (bound-and-true-p company-mode)
(or company-candidates
(and (company-pcomplete-available)
(company-pcomplete--prefix)
(company-pcomplete--candidates))))
(call-interactively #'company-pcomplete)
(ignore-errors (pcomplete-std-complete))))
;;;###autoload
(defun +eshell/quit-or-delete-char (arg)