aboutsummaryrefslogtreecommitdiffstats
path: root/.lush/scripts
diff options
context:
space:
mode:
authorGravatar BanceDev 2024-09-03 11:11:17 -0400
committerGravatar BanceDev 2024-09-03 11:11:17 -0400
commit3577398f4a319f0419f2c129ba09b8f14f3f0210 (patch)
tree239f79201aa536ee1d1373c4a0dbd7e24aff8020 /.lush/scripts
parentupdate lua api to table and added getcwd to api (diff)
added debug mode for scripting
Diffstat (limited to '.lush/scripts')
-rw-r--r--.lush/scripts/example.lua5
1 files changed, 5 insertions, 0 deletions
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)