From 3577398f4a319f0419f2c129ba09b8f14f3f0210 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Tue, 3 Sep 2024 11:11:17 -0400 Subject: added debug mode for scripting --- .lush/scripts/example.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.lush/scripts') diff --git a/.lush/scripts/example.lua b/.lush/scripts/example.lua index 279ad5e..b2f2f2b 100644 --- a/.lush/scripts/example.lua +++ b/.lush/scripts/example.lua @@ -30,6 +30,11 @@ if lush.exec('echo "hello world"\n') then print("echo worked properly") end +-- debug mode can be used to log execution of commands +lush.debug(true) -- enters debug +lush.exec('echo "echo in debug mode"') +lush.debug(false) -- exits debug + -- getcwd returns the current working directory local cwd = lush.getcwd() print(cwd) -- cgit v1.2.3-59-g8ed1b