diff --git a/lib/mu-util.h b/lib/mu-util.h index f20e4ec7..22fa5784 100644 --- a/lib/mu-util.h +++ b/lib/mu-util.h @@ -429,6 +429,8 @@ enum _MuError { MU_ERROR_INTERNAL = 3, MU_ERROR_NO_MATCHES = 4, + MU_ERROR_SCRIPT_NOT_FOUND = 8, + /* general xapian related error */ MU_ERROR_XAPIAN = 11, diff --git a/mu/mu-cmd-script.c b/mu/mu-cmd-script.c index b4fd1531..830c2fc3 100644 --- a/mu/mu-cmd-script.c +++ b/mu/mu-cmd-script.c @@ -185,8 +185,8 @@ mu_cmd_script (MuConfig *opts, GError **err) msi = mu_script_find_script_with_name (scripts, opts->script); if (!msi) { - mu_util_g_set_error (err, MU_ERROR_IN_PARAMETERS, - "script not found"); + mu_util_g_set_error (err, MU_ERROR_SCRIPT_NOT_FOUND, + "command or script not found"); goto leave; } diff --git a/mu/mu.cc b/mu/mu.cc index 3c20a3d0..83f75ab4 100644 --- a/mu/mu.cc +++ b/mu/mu.cc @@ -64,12 +64,16 @@ handle_error (MuConfig *conf, MuError merr, GError **err) "try 'mu index --rebuild'\n"); break; case MU_ERROR_XAPIAN_IS_EMPTY: - g_printerr ("database is empty; try 'mu index'"); + g_printerr ("database is empty; try 'mu index'\n"); break; case MU_ERROR_IN_PARAMETERS: if (conf && mu_config_cmd_is_valid(conf->cmd)) mu_config_show_help (conf->cmd); break; + case MU_ERROR_SCRIPT_NOT_FOUND: + g_printerr ("see the mu manpage for commands, or " + "'mu script' for the scripts\n"); + break; default: break; /* nothing to do */ }