* remove the --summary option (mu view, mu find), add the --after option (mu

find). see the documentation for details.
This commit is contained in:
djcb 2012-07-12 18:09:04 +03:00
parent d6ccf64ea8
commit 8f6d7b8388
4 changed files with 10 additions and 41 deletions

View File

@ -340,13 +340,9 @@ Note, if you specify a sortfield, by default, messages are sorted in reverse
(descending) order (e.g., from lowest to highest). This is usually a good
choice, but for dates it may be more useful to sort in the opposite direction.
.TP
\fB\-\-summary\fR
output a summary based upon the first lines of the message.
.TP
\fB\-\-summary-len=<number>\fR
Number of lines to use for the summary. Default: 5.
If > 0, use that number of lines of the message to provide a summary.
.TP
\fB\-\-include\-unreadable\fR

View File

@ -1,4 +1,4 @@
.TH MU VIEW 1 "April 2012" "User Manuals"
.TH MU VIEW 1 "July 2012" "User Manuals"
.SH NAME
@ -21,14 +21,9 @@ any).
.SH OPTIONS
.TP
\fB\-\-summary\fR
\fB\-\-summary-len\fR=\fI<number>\fR
instead of displaying the full message, output a summary based upon the first
lines of the message.
.TP
\fB\-\-summary-len=<number>\fR
Number of lines to use for the summary. Default: 5.
\fI<number>\fR lines of the message.
\fB\-\-terminate\fR
terminate messaages with a \\f (\fIform-feed\fR) characters when displaying

View File

@ -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,

View File

@ -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 */