diff options
| -rw-r--r-- | init.el | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -591,7 +591,7 @@ (use-package jao-notify :demand t :init (setq jao-notify-use-messages (jao-d-l 'mac t) - jao-notify-audio-icon (jao-data-file "music-player-icon.png"))) + jao-notify-audio-icon (jao-data-file "music-player-icon.png"))) ;;;; tracking (use-package tracking @@ -1490,11 +1490,6 @@ (defun jao-eshell--git-dirty () (shell-command-to-string "git diff-index --quiet HEAD -- || echo -n '*'")) -(use-package git-ps1-mode - :ensure t - :init (setq git-ps1-mode-showupstream "1" - git-ps1-mode-showdirtystate "1")) - (defun jao-eshell--git-info () (if (fboundp 'git-ps1-mode-get-current) (git-ps1-mode-get-current) @@ -1519,11 +1514,13 @@ (when (and venv (string-match ".*/\\([^/]+\\)/$" venv)) (match-string-no-properties 1 venv)))) +(defvar jao-eshell-prompt-show-git nil) + (defun jao-eshell-prompt-function () (let* ((venv (jao-eshell--virtualenv)) (venv (if venv (format "%s" venv) ""))) (concat (abbreviate-file-name (eshell/pwd)) - (jao-eshell--git-current-branch venv) + (if jao-eshell-prompt-show-git (jao-eshell--git-current-branch venv)) (if (= (user-uid) 0) " # " " $ ")))) (setq eshell-prompt-function 'jao-eshell-prompt-function) @@ -1676,6 +1673,13 @@ (use-package git-link :ensure t) (use-package git-modes :ensure t) +(use-package git-ps1-mode + :ensure t + :init + (setq git-ps1-mode-showupstream "1" + git-ps1-mode-showdirtystate "1" + git-ps1-mode-lighter-text-format " [%s]")) + ;;; Programming (require 'jao-custom-programming) |
