Closed yilkalargaw closed 1 year ago
I tested this on Windows and it seemed to be reeeeeaaally slow.
Yes I forgot to test it on windows. Will try it out when I find a windows pc. I will see if I could patch it.
Sorry, missed this PR first time around. I'll hold off on merging it until you guys get that issue sorted, though.
What do you think about this, for unix-like systems?
(telephone-line-defsegment* telephone-line-git-project
(replace-regexp-in-string "\n$" ""
(shell-command-to-string
"basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null")))
(telephone-line-defsegment* telephone-line-git-branch
(replace-regexp-in-string "\n$" ""
(shell-command-to-string
"git rev-parse --abbrev-ref HEAD 2>/dev/null")))
I tried eval-region and got...
Malformed arglist: (lambda (face) (replace-regexp-in-string $ (shell-command-to-string echo "$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null)::$(git rev-parse --abbrev-ref HEAD 2>/dev/null)")))
I think this has something to do with the macro expansion, but my elisp (or lisp in general) are not THAT good :)
Ok should be interesting to get the current magit-project and the current magit-brach.
I added a segment for version control information for buffers like dired, magit, eshell etc... where vc-mode is null.