2014-12-06 06:28:03 +08:00
|
|
|
(my--cleanup-buffers-add "^\\*Shell Command Output\\*$")
|
|
|
|
(my--cleanup-buffers-add "^\\*Async Shell Command\\*$")
|
|
|
|
|
2015-02-01 17:26:02 +08:00
|
|
|
;; Make shell scrips executable on save?
|
|
|
|
;; (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
|
2014-12-06 06:28:03 +08:00
|
|
|
|
|
|
|
;; Color in *Shell Command Output*
|
|
|
|
(require 'ansi-color)
|
|
|
|
(defadvice display-message-or-buffer (before ansi-color activate)
|
|
|
|
"Process ANSI color codes in shell output."
|
|
|
|
(let ((buf (ad-get-arg 0)))
|
|
|
|
(and (bufferp buf)
|
|
|
|
(string= (buffer-name buf) "*Shell Command Output*")
|
|
|
|
(with-current-buffer buf
|
|
|
|
(ansi-color-apply-on-region (point-min) (point-max))))))
|
2014-12-13 04:35:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
(provide 'init-sh)
|
|
|
|
;;; init-sh.el ends here
|