branch: elpa/javelin
commit 065dd73b464168f456fcb90db51be160070fce39
Author: Jonas Collberg <[email protected]>
Commit: Jonas Collberg <[email protected]>
Simplify `harpoon-project-root-function`
Use `expand-file-name` instead of running shell command.
This is a just a simplification that shouldn't change any observable
behavior.
---
harpoon.el | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/harpoon.el b/harpoon.el
index 546fadba8a3..399f4c92fd4 100644
--- a/harpoon.el
+++ b/harpoon.el
@@ -83,10 +83,7 @@
"Get the project root."
(cond
((eq harpoon-project-package 'projectile) (when (fboundp
'projectile-project-root) (projectile-project-root)))
- ((eq harpoon-project-package 'project) (replace-regexp-in-string "~/"
- (concat
(car (split-string
-
(shell-command-to-string "echo $HOME") "\n")) "/")
- (when
(fboundp 'project-root) (project-root (project-current)))))))
+ ((eq harpoon-project-package 'project) (expand-file-name (when (fboundp
'project-root) (project-root (project-current)))))))
(defun harpoon--current-file-directory ()
"Return current directory path sanitized."