* remove the --summary option (mu view, mu find), add the --after option (mu
find). see the documentation for details.
This commit is contained in:
@ -32,12 +32,8 @@
|
||||
#include "mu-config.h"
|
||||
#include "mu-cmd.h"
|
||||
|
||||
|
||||
static MuConfig MU_CONFIG;
|
||||
|
||||
#define DEFAULT_SUMMARY_LEN 5
|
||||
|
||||
|
||||
static MuConfigFormat
|
||||
get_output_format (const char *formatstr)
|
||||
{
|
||||
@ -88,7 +84,6 @@ set_group_mu_defaults (void)
|
||||
|
||||
if (!isatty(fileno(stdout)))
|
||||
MU_CONFIG.nocolor = TRUE;
|
||||
|
||||
}
|
||||
|
||||
static GOptionGroup*
|
||||
@ -186,19 +181,6 @@ set_group_find_defaults (void)
|
||||
else
|
||||
MU_CONFIG.format =
|
||||
get_output_format (MU_CONFIG.formatstr);
|
||||
|
||||
if (MU_CONFIG.linksdir) {
|
||||
gchar *old = MU_CONFIG.linksdir;
|
||||
MU_CONFIG.linksdir = mu_util_dir_expand(MU_CONFIG.linksdir);
|
||||
if (!MU_CONFIG.linksdir) /* we'll check the dir later */
|
||||
MU_CONFIG.linksdir = old;
|
||||
else
|
||||
g_free(old);
|
||||
}
|
||||
|
||||
if ((MU_CONFIG.summary && !MU_CONFIG.summary_len)||
|
||||
(MU_CONFIG.summary_len < 1))
|
||||
MU_CONFIG.summary_len = DEFAULT_SUMMARY_LEN;
|
||||
}
|
||||
|
||||
static GOptionGroup*
|
||||
@ -216,8 +198,8 @@ config_options_group_find (void)
|
||||
"use a bookmarked query", NULL},
|
||||
{"reverse", 'z', 0, G_OPTION_ARG_NONE, &MU_CONFIG.reverse,
|
||||
"sort in reverse (descending) order (z -> a)", NULL},
|
||||
{"summary", 'k', 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary,
|
||||
"include a short summary of the message (false)", NULL},
|
||||
/* {"summary", 'k', 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary, */
|
||||
/* "(deprecated; use --summary-len)", NULL}, */
|
||||
{"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len,
|
||||
"use up to <n> lines for the summary (5)", NULL},
|
||||
{"linksdir", 0, 0, G_OPTION_ARG_STRING, &MU_CONFIG.linksdir,
|
||||
@ -303,10 +285,6 @@ set_group_view_defaults (void)
|
||||
MU_CONFIG.format = MU_CONFIG_FORMAT_PLAIN;
|
||||
else
|
||||
MU_CONFIG.format = get_output_format (MU_CONFIG.formatstr);
|
||||
|
||||
if ((MU_CONFIG.summary && !MU_CONFIG.summary_len)||
|
||||
(MU_CONFIG.summary_len < 1))
|
||||
MU_CONFIG.summary_len = DEFAULT_SUMMARY_LEN;
|
||||
}
|
||||
|
||||
static GOptionGroup *
|
||||
@ -315,9 +293,9 @@ config_options_group_view (void)
|
||||
GOptionGroup *og;
|
||||
GOptionEntry entries[] = {
|
||||
{"summary", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.summary,
|
||||
"only show a short summary of the message (false)", NULL},
|
||||
{"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len,
|
||||
"use up to <n> lines for the summary (5)", NULL},
|
||||
"(deprecated; use --summary-len)", NULL},
|
||||
/* {"summary-len", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.summary_len, */
|
||||
/* "use up to <n> lines for the summary (5)", NULL}, */
|
||||
{"terminate", 0, 0, G_OPTION_ARG_NONE, &MU_CONFIG.terminator,
|
||||
"terminate messages with ascii-0x07 (\\f, form-feed)", NULL},
|
||||
{"format", 'o', 0, G_OPTION_ARG_STRING, &MU_CONFIG.formatstr,
|
||||
|
||||
@ -119,7 +119,7 @@ struct _MuConfig {
|
||||
gboolean reverse; /* sort in revers order (z->a) */
|
||||
gboolean threads; /* show message threads */
|
||||
|
||||
gboolean summary; /* include a summary? */
|
||||
gboolean summary; /* OBSOLETE: use summary_len */
|
||||
int summary_len; /* max # of lines for summary */
|
||||
|
||||
char *bookmark; /* use bookmark */
|
||||
|
||||
Reference in New Issue
Block a user