Fancier eshell prompt + fix yasnippet loading
This commit is contained in:
parent
c4e6104c64
commit
f019c1153e
@ -2640,12 +2640,14 @@ A function to properly clear the eshell:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun jdormit-eshell-prompt ()
|
||||
(let ((branch (magit-name-local-branch "HEAD")))
|
||||
(format "%s%s"
|
||||
(if branch (format "(%s) " branch) "")
|
||||
(concat (abbreviate-file-name (eshell/pwd))
|
||||
(if (= (user-uid) 0) " # " " $ ")))))
|
||||
(format "%s%s"
|
||||
(if branch (format "(%s) " branch) "")
|
||||
(concat (abbreviate-file-name (eshell/pwd))
|
||||
(propertize
|
||||
(if (= (user-uid) 0) " # " " λ ")
|
||||
'face `(:foreground "#859900"))))))
|
||||
|
||||
(setq jdormit-eshell-prompt-regex "^[^#$\n]* [#$] ")
|
||||
(setq jdormit-eshell-prompt-regex "^[^#λ\n]* [#λ] ")
|
||||
|
||||
(setq eshell-prompt-function 'jdormit-eshell-prompt)
|
||||
(setq eshell-prompt-regexp jdormit-eshell-prompt-regex)
|
||||
@ -4883,7 +4885,8 @@ YASnippet is Yet Another Snippet template system.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package yasnippet
|
||||
:hook ((text-mode . yas-minor-mode)
|
||||
(prog-mode . yas-minor-mode))
|
||||
(prog-mode . yas-minor-mode)
|
||||
(after-init . yas-reload-all))
|
||||
:config
|
||||
(unless (file-exists-p (expand-file-name "~/.emacs.d/snippets"))
|
||||
(mkdir (expand-file-name "~/.emacs.d/snippets") t))
|
||||
|
Loading…
Reference in New Issue
Block a user