The command line supports various execution modes, as you can see:
1Lumesh scripting language runtime
2
3Usage: lume [OPTIONS] [FILE_N_ARGS]... [-- [CMD_ARGV]...]
4
5Arguments:
6 [FILE_N_ARGS]... script file and args to execute
7 [CMD_ARGV]... args for cmd
8
9Options:
10 -p, --profile config file
11 -s, --strict strict mode
12 -i, --interactive force interactive mode
13 -m, --cfmoff NO command first mode
14 -a, --aioff NO ai mode
15 -n, --nohistory NO history (private) mode
16 -c, --cmd <CMD> command to eval
17 -h, --help Print help
18 -V, --version Print versionInteractive Mode#
Strict Mode (s)
Variables must be defined;
Variables cannot be redefined;
Variables must be prefixed with$when used;Interactive Mode (i)
Regardless of whether a command is specified, it enters interactive mode, allowing the user to type commands.Command Priority Mode (default)
In interactive command mode, if the input is only one line, it uses command priority mode.
In this mode, it prioritizes parsing as a command rather than programming, treating characters like.and+as ordinary characters. For example,ping 1.1.1.1andchmod +x a.bare parsed as commands without needing quotes.
To bypass this mode, there are two methods:- Add the
-moption when starting lume; - Add
:at the beginning of the command line.
- Add the
No AI Mode
No History Mode
Parameter Passing#
lume -c cmd -- arg1 -arg2 --arg3lume -c cmd arg1 -arg2 --arg3
Completition#
press Tab
Running Scripts#
lume script.lm arg1 -arg2 --arg3
script.lm arg1 -arg2 --arg3 requires a shebang line and executable permissions (chmod +x).