mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat(yazi-plugin): retrieve HOME also on windows
This commit is contained in:
parent
f9fbe7225a
commit
7c72860d34
1 changed files with 1 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ end
|
|||
|
||||
function utils.readable_path(path)
|
||||
local home = os.getenv("HOME")
|
||||
home = home and home or os.getenv("USERPROFILE")
|
||||
if home == nil then
|
||||
return path
|
||||
elseif string.sub(path, 1, #home) == home then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue