From 3588b0371311f744621b243d117bab58959c2a89 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 27 Jun 2024 16:04:14 +0100 Subject: (Emacs/elisp)~fix eshell-prompt not showing changed files correctly Simple fix as I didn't call the command before splitting the string --- Emacs/.config/emacs/elisp/eshell-prompt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/elisp/eshell-prompt.el b/Emacs/.config/emacs/elisp/eshell-prompt.el index 53033df..8c156b8 100644 --- a/Emacs/.config/emacs/elisp/eshell-prompt.el +++ b/Emacs/.config/emacs/elisp/eshell-prompt.el @@ -65,7 +65,7 @@ a repository. If there are no changes i.e. the worktree is clean then a green tick is returned, but if there are changes then the number of files affected are returned in red." (let* ((git-cmd "git status -s") - (command-output (split-string git-cmd)) + (command-output (split-string (shell-command-to-string git-cmd) "\n")) (changed-files (- (length command-output) 1))) (if (= changed-files 0) (propertize "✓" 'font-lock-face '(:foreground "green")) -- cgit v1.2.3-13-gbd6f