Skip to content

Commit

Permalink
Added new expand-home-dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Aug 16, 2023
1 parent 03e7e07 commit 0ae9a17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lutil-file.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
'true)
('true 'false)))

(defun expand-home-dir (path)
(if (is-home-dir? path)
(filename:join (list (lutil:home)
(string:substr path 3)))
path))

(defun cwd ()
(case (file:get_cwd)
(`#(ok ,dir) dir)
Expand Down

0 comments on commit 0ae9a17

Please sign in to comment.