scm: support --eval
With the ~--eval~ option you can evaluate an expression in mu/scm environment. For example: $ mu scm --eval \ '(format #t "found ~d match(es)\n" (length (mfind "hello")))' found 7173 match(es) Add command-line parameter and implement.
This commit is contained in:
@ -650,7 +650,9 @@ sub_scm(CLI::App& sub, Options& opts)
|
||||
->excludes("--listen");
|
||||
sub.add_option("script-args", opts.scm.params, "Parameters for script")
|
||||
->type_name("<parameters>");
|
||||
|
||||
sub.add_option("--eval", opts.scm.eval, "Expression to evaluate")
|
||||
->excludes("--listen")
|
||||
->excludes("script-path");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user