# HG changeset patch # User Oleksandr Gavenko # Date 1485444421 -7200 # Node ID d6606777ff0a5b4120a4b3a8527362388653c65c # Parent 6beb77e22575338e4e69b06e54a94bb7477abe94 Enable company mode for shell scripts. diff -r 6beb77e22575 -r d6606777ff0a .emacs-my --- a/.emacs-my Thu Jan 26 17:09:36 2017 +0200 +++ b/.emacs-my Thu Jan 26 17:27:01 2017 +0200 @@ -3372,6 +3372,14 @@ (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode)) +(defun my/sh-company-setup () + (make-local-variable 'company-backends) + (setq company-backends '((company-capf company-files))) + (company-mode 1)) + +(when (featurep 'company) + (add-hook 'sh-mode-hook #'my/sh-company-setup)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "pg, Proof General")