* guile: make running guile scripts a bit more convenient, document it

For example, you can now run a script like:

      $ mu msgs-per-month --textonly --query=hello
This commit is contained in:
djcb
2013-06-09 12:11:01 +03:00
parent 59d0a30ba6
commit 05bfd23e4d
7 changed files with 142 additions and 85 deletions

View File

@ -177,9 +177,9 @@ mu_cmd_script (MuConfig *opts, GError **err)
if (err && *err)
goto leave;
if (!opts->script) {
if (g_strcmp0 (opts->cmdstr, "script") == 0) {
print_scripts (scripts, !opts->nocolor, opts->verbose,
opts->params[1], err);
opts->script_params[0], err);
goto leave;
}
@ -191,8 +191,7 @@ mu_cmd_script (MuConfig *opts, GError **err)
}
/* do it! */
mu_script_guile_run (msi, opts->muhome,
(const gchar**)&opts->params[1], err);
mu_script_guile_run (msi, opts->muhome, opts->script_params, err);
leave:
/* this won't be reached, unless there is some error */
mu_script_info_list_destroy (scripts);