General cleanup

This commit is contained in:
Henrik Lissner 2016-05-24 22:15:44 -04:00
parent 2052fbba1c
commit 185ba75292
18 changed files with 793 additions and 704 deletions

View file

@ -1,5 +1,7 @@
;;; defuns-eshell.el
(require 'eshell)
(defun doom--eshell-in-prompt-p (&optional offset)
(>= (- (point) (or offset 0)) (save-excursion (eshell-bol) (point))))
@ -11,6 +13,16 @@
(concat " [" (substring branch 2) "]")
"")))
;;;###autoload
(defun doom/eshell (&optional same &rest _)
(interactive)
(let ((buf (get-buffer-create eshell-buffer-name)))
(cl-assert (and buf (buffer-live-p buf)))
(doom/popup-buffer buf)
(with-current-buffer buf
(unless (derived-mode-p 'eshell-mode)
(eshell-mode)))))
;;;###autoload
(defun doom/eshell-prompt ()
(concat (propertize (abbreviate-file-name (eshell/pwd)) 'face 'eshell-prompt)