From 8d92fc3b74902803e16a93f7215b483c087e3d81 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Tue, 30 Mar 2021 23:59:59 -0400 Subject: [PATCH] feat: cd with no path changes to homedir --- preload.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/preload.lua b/preload.lua index d129412..6b166e8 100644 --- a/preload.lua +++ b/preload.lua @@ -10,8 +10,10 @@ commander.register('cd', function (path) local ok, err = pcall(function() fs.cd(path[1]) end) if not ok then if err == 1 then - print("directory does not exist") + print('directory does not exist') end end + return end + fs.cd(os.getenv 'HOME') end)