From e8f8a61a741795cffea89d78c6f5fad272219101 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 1 Mar 2019 20:30:58 +0700 Subject: [PATCH] Fix: failed test cases. Close #123. --- doom-modeline-core.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doom-modeline-core.el b/doom-modeline-core.el index ebaeeb8..641fb93 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -522,9 +522,9 @@ If DEFAULT is non-nil, set the default mode-line for all buffers." "Return fish-style truncated string based on FULL-PATH. Optional parameter TRUNCATE-ALL will cause the function to truncate the last directory too." - (let* ((home (getenv "HOME")) + (let* ((home (expand-file-name "~")) (path (replace-regexp-in-string - (s-concat "^" home "$") "~" full-path)) + (s-concat "^" home) "~" full-path)) (split (s-split "/" path 'omit-nulls)) (split-len (length split)) shrunk)