* mu-config: rationalize the command line params a bit

This commit is contained in:
Dirk-Jan C. Binnema 2009-12-11 19:45:37 +02:00
parent 79ecb1a0fd
commit 2873a92a33
1 changed files with 8 additions and 13 deletions

View File

@ -29,7 +29,7 @@ mu_config_options_group_mu (MuConfigOptions *opts)
{ {
GOptionGroup *og; GOptionGroup *og;
GOptionEntry entries[] = { GOptionEntry entries[] = {
{ "debug", 'd', 0, G_OPTION_ARG_NONE, &opts->debug, { "debug", 'g', 0, G_OPTION_ARG_NONE, &opts->debug,
"print debug output to standard-error", NULL }, "print debug output to standard-error", NULL },
{ "quiet", 'q', 0, G_OPTION_ARG_NONE, &opts->quiet, { "quiet", 'q', 0, G_OPTION_ARG_NONE, &opts->quiet,
"don't give any progress information", NULL }, "don't give any progress information", NULL },
@ -37,7 +37,7 @@ mu_config_options_group_mu (MuConfigOptions *opts)
"display version and copyright information", NULL}, "display version and copyright information", NULL},
{"muhome", 'h', 0, G_OPTION_ARG_FILENAME, &opts->muhome, {"muhome", 'h', 0, G_OPTION_ARG_FILENAME, &opts->muhome,
"mu directory", NULL}, "mu directory", NULL},
{"log-stderr", 's', 0, G_OPTION_ARG_NONE, &opts->log_stderr, {"log-stderr", 'e', 0, G_OPTION_ARG_NONE, &opts->log_stderr,
"log to standard error", NULL}, "log to standard error", NULL},
{"log-append", 'a', 0, G_OPTION_ARG_NONE, &opts->log_append, {"log-append", 'a', 0, G_OPTION_ARG_NONE, &opts->log_append,
"append to the current logfile (instead of overwriting it)", "append to the current logfile (instead of overwriting it)",
@ -62,8 +62,6 @@ mu_config_options_group_index (MuConfigOptions *opts)
GOptionEntry entries[] = { GOptionEntry entries[] = {
{"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &opts->maildir, {"maildir", 'm', 0, G_OPTION_ARG_FILENAME, &opts->maildir,
"top of the maildir", NULL}, "top of the maildir", NULL},
/* FIXME: implement this */
{"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex, {"reindex", 'r', 0, G_OPTION_ARG_NONE, &opts->reindex,
"re-index already indexed messages ", NULL}, "re-index already indexed messages ", NULL},
{ NULL, 0, 0, 0, NULL, NULL, NULL } { NULL, 0, 0, 0, NULL, NULL, NULL }
@ -83,19 +81,19 @@ mu_config_options_group_query (MuConfigOptions *opts)
GOptionGroup *og; GOptionGroup *og;
GOptionEntry entries[] = { GOptionEntry entries[] = {
{"xquery", 'x', 0, G_OPTION_ARG_NONE, &opts->xquery, {"xquery", 'x', 0, G_OPTION_ARG_NONE, &opts->xquery,
"print a string representation of the Xapian query", NULL}, "print the Xapian query", NULL},
{"fields", 'f', 0, G_OPTION_ARG_STRING, &opts->fields, {"fields", 'f', 0, G_OPTION_ARG_STRING, &opts->fields,
"fields to display in output", NULL}, "fields to display in output", NULL},
{"sortfield", 's', 0, G_OPTION_ARG_STRING, &opts->sortfield_str, {"sortfield", 's', 0, G_OPTION_ARG_STRING, &opts->sortfield_str,
"field to sort on", NULL}, "field to sort on", NULL},
{"ascending", 'a', 0, G_OPTION_ARG_NONE, &opts->ascending_flag, {"ascending", 'u', 0, G_OPTION_ARG_NONE, &opts->ascending_flag,
"sort ascending", NULL}, "sort ascending (up)", NULL},
{"descending", 'c', 0, G_OPTION_ARG_NONE, &opts->descending_flag, {"descending", 'd', 0, G_OPTION_ARG_NONE, &opts->descending_flag,
"sort ascending", NULL}, "sort descending (down)", NULL},
{ NULL, 0, 0, 0, NULL, NULL, NULL } { NULL, 0, 0, 0, NULL, NULL, NULL }
}; };
og = g_option_group_new ("querying", og = g_option_group_new ("query",
"options for the 'query' command", "options for the 'query' command",
"", NULL, NULL); "", NULL, NULL);
g_option_group_add_entries (og, entries); g_option_group_add_entries (og, entries);
@ -104,9 +102,6 @@ mu_config_options_group_query (MuConfigOptions *opts)
} }
void void
mu_config_init (MuConfigOptions *opts) mu_config_init (MuConfigOptions *opts)
{ {