2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 11:13:24 +00:00

feat: cd with no path changes to homedir

This commit is contained in:
TorchedSammy 2021-03-30 23:59:59 -04:00
parent 7326cb77c6
commit 8d92fc3b74

View File

@ -10,8 +10,10 @@ commander.register('cd', function (path)
local ok, err = pcall(function() fs.cd(path[1]) end) local ok, err = pcall(function() fs.cd(path[1]) end)
if not ok then if not ok then
if err == 1 then if err == 1 then
print("directory does not exist") print('directory does not exist')
end end
end end
return
end end
fs.cd(os.getenv 'HOME')
end) end)