From 23fb50c50922d7d4d9d0b1ea851e77f342b45de8 Mon Sep 17 00:00:00 2001 From: BanceDev Date: Tue, 10 Sep 2024 14:32:59 -0400 Subject: added better demo to readme --- README.md | 10 ++++++++++ demo.png | Bin 78824 -> 12269 bytes 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index df29381..a1ef970 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,16 @@ To update Lunar Shell pull the repo and run the install script again.

+```lua +if args ~= nil and args[1] ~= nil then + if args[1]:match("%.c$") then + lush.exec("gcc -o " .. args[1]:sub(1, -3) .. " " .. args[1]) + end +else + print("must pass a C file to compile") +end +``` + With the robust and ever growing Lua API that Lunar Shell has builtin, not only can you create powerful shell scripts to automate your workflow but also reap the benefits of having an easy to understand scripting language embedded into your command line. To run a Lua script with Lunar Shell just type the name of the lua file you want to run followed by any arguments you want to pass to the script. Lunar Shell will automatically search the current working directory as well as the ```~/.lush/scripts``` directory and then execute the file if it locates a match. diff --git a/demo.png b/demo.png index 8c9ca7c..007e334 100644 Binary files a/demo.png and b/demo.png differ -- cgit v1.2.3-59-g8ed1b