summary refs log tree commit diff
path: root/config/init-shell.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-04-06 11:22:57 -0700
committerFranck Cuny <franck@fcuny.net>2024-04-06 11:22:57 -0700
commit7c5780a719565630f58e7751afa8c7e458c49871 (patch)
treef8863ebcbd4a1e551a63374b3fee589affca1393 /config/init-shell.el
parentmove some display stuff (diff)
downloademacs.d-7c5780a719565630f58e7751afa8c7e458c49871.tar.gz
a org file is definitely not the way for me
Diffstat (limited to 'config/init-shell.el')
-rw-r--r--config/init-shell.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/config/init-shell.el b/config/init-shell.el
new file mode 100644
index 0000000..643877b
--- /dev/null
+++ b/config/init-shell.el
@@ -0,0 +1,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