Skip to content

Commit

Permalink
Fix #2390
Browse files Browse the repository at this point in the history
Sets up company in eshell-mode-hook during the init phase so that it can
be reliably disabled in user config.
  • Loading branch information
TheBB authored and Daniel Luna committed Sep 14, 2015
1 parent f355bd2 commit 8384ba9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions layers/shell/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
(defun shell/pre-init-company ()
;; support in eshell
(spacemacs|use-package-add-hook eshell
:post-init
(progn
(push 'company-capf company-backends-eshell-mode)
(spacemacs|add-company-hook eshell-mode))
:post-config
(progn
(defun spacemacs//toggle-shell-auto-completion-based-on-path ()
Expand All @@ -45,9 +49,7 @@ the user activate the completion manually."
"Sets the company frontend to `company-preview-frontend' in e-shell mode."
(setq-local company-frontends '(company-preview-frontend)))
(add-hook 'eshell-mode-hook
'spacemacs//eshell-switch-company-frontend)
(push 'company-capf company-backends-eshell-mode)
(spacemacs|add-company-hook eshell-mode))))
'spacemacs//eshell-switch-company-frontend))))

(defun shell/init-eshell ()
(use-package eshell
Expand Down

0 comments on commit 8384ba9

Please sign in to comment.