From f019c1153e7ba648ddab1cb97a012fdc6a32bf5b Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Mon, 11 Jan 2021 15:18:57 -0500 Subject: [PATCH] Fancier eshell prompt + fix yasnippet loading --- emacs/.emacs.d/init.org | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 62e6ff8..1eef7af 100755 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -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))