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")