diff options
| author | 2024-09-08 12:41:18 -0400 | |
|---|---|---|
| committer | 2024-09-08 12:41:18 -0400 | |
| commit | ea0eb66096ddc62758d613e9eae84b9d8b3061dc (patch) | |
| tree | 9be2d6cbda389d174554d05481797a2b107ac0f4 /src/lush.c | |
| parent | added --version flag (diff) | |
added support for cli args for lua scripts
Diffstat (limited to 'src/lush.c')
| -rw-r--r-- | src/lush.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -127,8 +127,14 @@ int lush_time(lua_State *L, char ***args) { int lush_lua(lua_State *L, char ***args) { // run the lua file given - lua_load_script(L, args[0][0]); + const char *script = args[0][0]; + // move args forward to any command line args + args[0]++; + + lua_load_script(L, script, args[0]); + // return pointer back to lua file + args[0]--; return 1; } |
