Use tilde expansion when running save-as command

This commit is contained in:
Francesco Abbate
2021-02-16 22:54:00 +01:00
parent 1decf67b64
commit 6369a7f760
3 changed files with 16 additions and 13 deletions
+9
View File
@@ -214,6 +214,15 @@ function common.home_encode(text)
end
function common.home_encode_list(paths)
local t = {}
for i = 1, #paths do
t[i] = common.home_encode(paths[i])
end
return t
end
function common.home_expand(text)
return HOME and text:gsub("^~", HOME) or text
end