;; Time-stamp: <2014-07-01 14:16:19 kmodi>

;; Shell Script Mode

(defun my-sh-mode-customizations()
  (when (boundp 'setup-linum-loaded)
    (nlinum-mode 1))
  )
(add-hook 'sh-mode-hook 'my-sh-mode-customizations)


(provide 'setup-shell)

;; Time-stamp: <2015-01-14 10:57:34 kmodi>

;; Shell Script Mode

(defun my/tcsh-set-indent-functions ()
  (when (or (string-match ".*\\.alias" (buffer-file-name))
            (string-match ".*\\.setup.*" (buffer-file-name))
            (string-match ".*\\.cfg" (buffer-file-name))
            (string-match ".*csh$" (file-name-extension (buffer-file-name))))
    (require 'csh-mode) ; https://github.com/Tux/tcsh/blob/master/csh-mode.el
    (setq-local indent-line-function   'csh-indent-line)
    (setq-local indent-region-function 'csh-indent-region)))
(add-hook 'sh-set-shell-hook #'my/tcsh-set-indent-functions)


(provide 'setup-shell)

Fix indentation in buffers with tcsh scripts
Fix indentation in buffers with tcsh scripts

kaushalmodi/.emacs.d,kaushalmodi/.emacs.d