From 971f6f0a20df936b1070139b22fff1af8d37ea4a Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 4 Feb 2026 16:23:59 +0800 Subject: Updated README.md. [skip CI] --- README.md | 61 ++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index e9ee22f..57343cf 100644 --- a/README.md +++ b/README.md @@ -88,29 +88,44 @@ f! ```sh > yue -h -Usage: yue [options|files|directories] ... - - -h Print this message - -e str Execute a file or raw codes - -m Generate minified codes - -r Rewrite output to match original line numbers - -t path Specify where to place compiled files - -o file Write output to file - -s Use spaces in generated codes instead of tabs - -p Write output to standard out - -b Dump compile time (does not write output) - -g Dump global variables used in NAME LINE COLUMN - -l Write line numbers from source codes - -j Disable implicit return at end of file - -c Reserve comments before statement from source codes - -w path Watch changes and compile every file under directory - -v Print version - -- Read from standard in, print to standard out - (Must be first and only argument) - - --target=version Specify the Lua version that codes will be generated to - (version can only be 5.1, 5.2, 5.3 or 5.4) - --path=path_str Append an extra Lua search path string to package.path +Usage: yue + [options] [] ... + yue -e [args...] + yue -w [] [options] + yue - + +Notes: + - '-' / '--' must be the first and only argument. + - '-o/--output' can not be used with multiple input files. + - '-w/--watch' can not be used with file input (directory only). + - with '-e/--execute', remaining tokens are treated as script args. + +Options: + -h, --help Show this help message and exit. + -e , --execute Execute a file or raw codes + -m, --minify Generate minified codes + -r, --rewrite Rewrite output to match original line numbers + -t , --output-to + Specify where to place compiled files + -o , --output Write output to file + -p, --print Write output to standard out + -b, --benchmark Dump compile time (doesn't write output) + -g, --globals Dump global variables used in NAME LINE COLUMN + -s, --spaces Use spaces in generated codes instead of tabs + -l, --line-numbers Write line numbers from source codes + -j, --no-implicit-return Disable implicit return at end of file + -c, --reserve-comments Reserve comments before statement from source codes + -w [], --watch [] + Watch changes and compile every file under directory + -v, --version Print version + - Read from standard in, print to standard out + (Must be first and only argument) + -- Same as '-' (kept for backward compatibility) + + --target Specify the Lua version that codes will be generated to + (version can only be 5.1 to 5.5) + --path Append an extra Lua search path string to package.path + --= Pass compiler option in key=value form (existing behavior) Execute without options to enter REPL, type symbol '$' in a single line to start/stop multi-line mode -- cgit v1.2.3-55-g6feb