summary refs log tree commit diff
path: root/config/init-shell.el
blob: 643877b5ec3b2024cf5c6ea8a64bf1e55eb9d1f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;; init-shell.el --- configure shell -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;; configure shell

;;; Code:

(use-package sh-script
  :defer t
  :preface
  (defvar sh-script-initialized nil)

  (defun initialize-sh-script ()
    (unless sh-script-initialized
      (setq sh-script-initialized t)
      (info-lookup-add-help :mode 'shell-script-mode
                            :regexp ".*"
                            :doc-spec '(("(bash)Index")))))
  :init
  (add-hook 'shell-mode-hook #'initialize-sh-script))

(add-hook 'after-save-hook
              #'executable-make-buffer-file-executable-if-script-p)

(provide 'init-shell)

;;; init-shell.el ends here