* mu: improve mu script help
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
|
/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -76,7 +77,9 @@ print_scripts (GSList *scripts, gboolean verbose, const char *rxstr,
|
|||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
|
|
||||||
g_print ("%s%s%s", name,
|
g_print ("%s%s%s%s",
|
||||||
|
verbose ? "" : " * ",
|
||||||
|
name,
|
||||||
oneline ? ": " : "",
|
oneline ? ": " : "",
|
||||||
oneline ? oneline :"");
|
oneline ? oneline :"");
|
||||||
|
|
||||||
|
|||||||
@ -601,13 +601,18 @@ cmd_help (void)
|
|||||||
{
|
{
|
||||||
MuConfigCmd cmd;
|
MuConfigCmd cmd;
|
||||||
|
|
||||||
|
if (!MU_CONFIG.params)
|
||||||
|
cmd = MU_CONFIG_CMD_UNKNOWN;
|
||||||
|
else
|
||||||
cmd = cmd_from_string (MU_CONFIG.params[1]);
|
cmd = cmd_from_string (MU_CONFIG.params[1]);
|
||||||
|
|
||||||
if (cmd == MU_CONFIG_CMD_UNKNOWN) {
|
if (cmd == MU_CONFIG_CMD_UNKNOWN) {
|
||||||
mu_config_show_help (MU_CONFIG_CMD_HELP);
|
mu_config_show_help (MU_CONFIG_CMD_HELP);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
mu_config_show_help (cmd);
|
mu_config_show_help (cmd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,6 +645,8 @@ parse_params (int *argcp, char ***argvp)
|
|||||||
case MU_CONFIG_CMD_HELP:
|
case MU_CONFIG_CMD_HELP:
|
||||||
/* 'help' is special; sucks in the options of the
|
/* 'help' is special; sucks in the options of the
|
||||||
* command after it */
|
* command after it */
|
||||||
|
g_option_context_set_main_group(context,
|
||||||
|
config_options_group_mu());
|
||||||
rv = g_option_context_parse (context, argcp, argvp, &err) &&
|
rv = g_option_context_parse (context, argcp, argvp, &err) &&
|
||||||
cmd_help ();
|
cmd_help ();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -21,9 +21,8 @@
|
|||||||
#STRING
|
#STRING
|
||||||
mu add <file> [<files>]
|
mu add <file> [<files>]
|
||||||
#STRING
|
#STRING
|
||||||
mu add is the command to add specific measage files to the
|
mu add is the command to add specific measage files to the database. Each of the
|
||||||
database. Each of the files must be specified with an
|
files must be specified with an absolute path.
|
||||||
absolute path
|
|
||||||
#END
|
#END
|
||||||
|
|
||||||
#BEGIN MU_CONFIG_CMD_CFIND
|
#BEGIN MU_CONFIG_CMD_CFIND
|
||||||
@ -48,8 +47,19 @@ mu find [options] <search expression>
|
|||||||
#STRING
|
#STRING
|
||||||
mu find is the mu command for searching e-mail message that were
|
mu find is the mu command for searching e-mail message that were
|
||||||
stored earlier using mu index(1).
|
stored earlier using mu index(1).
|
||||||
#END
|
|
||||||
|
|
||||||
|
Some examples:
|
||||||
|
# get all messages with 'bananas' in body, subject or recipient fields:
|
||||||
|
$ mu find bananas
|
||||||
|
|
||||||
|
# get all messages regarding bananas from John with an attachment:
|
||||||
|
$ mu find from:john flag:attach bananas
|
||||||
|
|
||||||
|
# get all messages with subject wombat in June 2009
|
||||||
|
$ mu find subject:wombat date:20090601..20090630
|
||||||
|
|
||||||
|
See the `mu-find' and `mu-easy' man-pages for more information.
|
||||||
|
#END
|
||||||
|
|
||||||
#BEGIN MU_CONFIG_CMD_HELP
|
#BEGIN MU_CONFIG_CMD_HELP
|
||||||
#STRING
|
#STRING
|
||||||
@ -106,6 +116,17 @@ With -v, give longer descriptions of each script.
|
|||||||
|
|
||||||
With --script=<script>, run the script whose name is <script>; pass
|
With --script=<script>, run the script whose name is <script>; pass
|
||||||
any arguments to the script after the '--' double-dash.
|
any arguments to the script after the '--' double-dash.
|
||||||
|
|
||||||
|
Some examples:
|
||||||
|
List all available scripts (one-line descriptions):
|
||||||
|
$ mu script
|
||||||
|
|
||||||
|
List all available scripts matching 'month' (long descriptions):
|
||||||
|
$ mu script -v month
|
||||||
|
|
||||||
|
Run the 'msgs-per-month' script, and pass it the '--textonly' parameter:
|
||||||
|
$ mu script --script=msgs-per-month -- --textonly
|
||||||
|
(as mentioned, parameters to the script follow the '--')
|
||||||
#END
|
#END
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user