From 3e2bfbf82908bec4850d6275a6afd542c3a8b9cf Mon Sep 17 00:00:00 2001 From: Tangent Date: Sat, 13 Jan 2024 01:35:29 -0700 Subject: [PATCH] ready for setup, test script --- README.md | 5 +++++ print-arguments.lua | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 print-arguments.lua diff --git a/README.md b/README.md index a79c808..b07b428 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # .lua-files It's like dotfiles, but no, it's just Lua scripts I find useful. + +## Installation +1. Put this folder somewhere. +2. Add that somewhere to your path. (On Windows, search for Environment Variables (it's "part of" Control Panel) and use the UI to add them to System variables.) +3. (On Windows) Add `.LUA` to PATHEXT. diff --git a/print-arguments.lua b/print-arguments.lua new file mode 100644 index 0000000..dc76578 --- /dev/null +++ b/print-arguments.lua @@ -0,0 +1,11 @@ +#!/usr/bin/env luajit + +for key, value in pairs(arg) do + print(key, value) + -- -n to -1 is FIRST the interpreter path and THEN variables passed to it in order + -- 0 is the path to the file being executed + -- 1+ are arguments. + -- powershell handles quotes, cmd does not even pass arguments +end + +-- os.execute("sleep 5")