From 554f7a23f12ba4df73c23de64d52855e82a37088 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 1 Feb 2026 14:06:52 +0300 Subject: refactor: improve stdin handling and shell command execution across platforms --- xmake/plugins/lua/xmake.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'xmake/plugins/lua/xmake.lua') diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index 467cde3f1..8b60c96d3 100644 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -45,20 +45,20 @@ 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, "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", + " - Single: echo print(\"hello\") | xmake lua --stdin", + " - Multiline: (echo print('1') && echo print('2')) | xmake lua --stdin", + " - File: type script.lua | xmake lua --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", + " - Single: Write-Output 'print(\"hello\")' | xmake lua --stdin", + " - Multiline: Write-Output \"print('1')`nprint('2')\" | xmake lua --stdin", + " - File: Get-Content script.lua | xmake lua --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" + " - Single: echo 'print(\"hello\")' | xmake lua --stdin", + " - Multiline: (echo 'print(\"1\")'; echo 'print(\"2\")') | xmake lua --stdin", + " - File: cat script.lua | xmake lua --stdin" } , {nil, "script" , "v" , nil , "Run the given lua script name, file or module and enter interactive mode if no given script.", "e.g.", -- cgit v1.3.1