diff options
| author | Saikari <[email protected]> | 2026-01-31 16:51:38 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-01-31 16:51:38 +0300 |
| commit | 5e59fa1d59486438337290e3d528561791843f7c (patch) | |
| tree | 1580fd18c585f9b1da20abba6c365d262f9ae4c3 /xmake/plugins/lua/xmake.lua | |
| parent | fa2d696a26d1e5738a38241e02908f6a3d8c52b8 (diff) | |
refactor: improve stdin command handling with detailed usage examples
Diffstat (limited to 'xmake/plugins/lua/xmake.lua')
| -rw-r--r-- | xmake/plugins/lua/xmake.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index c8ebc8ba3..527ecb19e 100644 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -45,7 +45,21 @@ task("lua") {'l', "list" , "k" , nil , "List all scripts." } , {'c', "command" , "k" , nil , "Run script as command" } , {'d', "deserialize" , "kv" , nil , "Deserialize arguments starts with given prefix" } - , {nil, "from-stdin" , "k" , nil , "Run script from stdin" } + , {nil, "from-stdin" , "k" , nil , "Run script from stdin", + "e.g.", + " - CMD", + " - Single: echo print('hello') | xmake lua --from-stdin", + " - Multiline: (echo print('1') && echo print('2')) | xmake lua --from-stdin", + " - File: type script.lua | xmake lua --from-stdin", + " - PWSH", + " - Single: Write-Output 'print(\"hello\")' | xmake lua --from-stdin", + " - Multiline: Write-Output \"print('1')`nprint('2')\" | xmake lua --from-stdin", + " - File: Get-Content script.lua | xmake lua --from-stdin", + " - SH", + " - Single: echo 'print(\"hello\")' | xmake lua --from-stdin", + " - Multiline: (echo 'print(\"1\")'; echo 'print(\"2\")') | xmake lua --from-stdin", + " - File: cat script.lua | xmake lua --from-stdin" + } , {nil, "script" , "v" , nil , "Run the given lua script name, file or module and enter interactive mode if no given script.", "e.g.", " - xmake lua (enter interactive mode)", |
