Fix: failed test cases.

Close #123.
This commit is contained in:
Vincent Zhang 2019-03-01 20:30:58 +07:00
parent 07782ea9f6
commit e8f8a61a74

View file

@ -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. "Return fish-style truncated string based on FULL-PATH.
Optional parameter TRUNCATE-ALL will cause the function to truncate the last Optional parameter TRUNCATE-ALL will cause the function to truncate the last
directory too." directory too."
(let* ((home (getenv "HOME")) (let* ((home (expand-file-name "~"))
(path (replace-regexp-in-string (path (replace-regexp-in-string
(s-concat "^" home "$") "~" full-path)) (s-concat "^" home) "~" full-path))
(split (s-split "/" path 'omit-nulls)) (split (s-split "/" path 'omit-nulls))
(split-len (length split)) (split-len (length split))
shrunk) shrunk)