Do not rely on / file separator in eshell git prompt

This commit is contained in:
Daniel - 2022-08-30 19:09:10 +02:00
parent 263d1af073
commit 2b7960d427
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ git repository."
(save-match-data
(let* ((git-branch (string-trim
(shell-command-to-string "git rev-parse --abbrev-ref HEAD")))
(base-dir (file-name-nondirectory (string-trim-right repo-dir "/?")))
(base-dir (file-name-nondirectory (directory-file-name repo-dir)))
state-list)
(when (file-exists-p (file-name-concat repo-dir ".git" "MERGE_HEAD"))