mirror of https://github.com/djcb/mu.git
* src/, man/, NEWS: rename --descending into --reverse
This commit is contained in:
parent
3d41a0fe3d
commit
e2fc573d42
4
NEWS
4
NEWS
|
@ -1,5 +1,9 @@
|
|||
* NEWS (user visible changes)
|
||||
|
||||
** Release 0.9.8 <>
|
||||
|
||||
- '--descending' has been renamed into '--reverse'
|
||||
|
||||
* Release 0.9.7 <>
|
||||
|
||||
- don't enforce UTF-8 output, use locale (fixes issue #11)
|
||||
|
|
|
@ -265,7 +265,7 @@ and not here, as they apply to multiple mu-commands.
|
|||
|
||||
The \fBfind\fR-command has various options that influence the way \fBmu\fR
|
||||
displays the results. If you don't specify anything, the defaults are
|
||||
\fI\-\-fields="d f s"\fR, \fI\-\-sortfield=date\fR and \fI\-\-descending\fR.
|
||||
\fI\-\-fields="d f s"\fR, \fI\-\-sortfield=date\fR and \fI\-\-reverse\fR.
|
||||
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-fields\fR=\fI<fields>\fR
|
||||
|
@ -307,8 +307,9 @@ have 'asz' as its corresponding output string, while an encrypted new message
|
|||
would have 'nx'.
|
||||
|
||||
.TP
|
||||
\fB\-s\fR, \fB\-\-sortfield\fR \fR=\fI<field>\fR and \fB\-z\fR, \fB\-\-descending\fR
|
||||
specifies the field to sort the search results by, and the direction. The
|
||||
\fB\-s\fR, \fB\-\-sortfield\fR \fR=\fI<field>\fR and \fB\-z\fR,
|
||||
\fB\-\-reverse\fR specifies the field to sort the search results by, and the
|
||||
direction (i.e., 'reverse' means that the sort should be reverted - Z-A). The
|
||||
following fields are supported:
|
||||
|
||||
.nf
|
||||
|
@ -326,11 +327,11 @@ following fields are supported:
|
|||
Thus, for example, to sort messages by date, you could specify:
|
||||
|
||||
.nf
|
||||
$ mu find fahrrad --fields "d f s" --sortfield=date --descending
|
||||
$ mu find fahrrad --fields "d f s" --sortfield=date --reverse
|
||||
.fi
|
||||
|
||||
Note, if you specify a sortfield, by default, messages are sorted in
|
||||
descending order (e.g., from lowest to highest). This is usually a good
|
||||
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
|
||||
|
|
|
@ -129,7 +129,7 @@ run_query (MuQuery *xapian, const gchar *query, MuConfig *opts,
|
|||
}
|
||||
|
||||
iter = mu_query_run (xapian, query, opts->threads, sortid,
|
||||
opts->descending ? FALSE : TRUE, err);
|
||||
opts->reverse, err);
|
||||
return iter;
|
||||
}
|
||||
|
||||
|
|
|
@ -166,12 +166,8 @@ set_group_find_defaults (MuConfig *opts)
|
|||
* *are* specified, we sort in ascending order. */
|
||||
if (!opts->fields) {
|
||||
opts->fields = "d f s";
|
||||
if (!opts->sortfield) {
|
||||
if (!opts->sortfield)
|
||||
opts->sortfield = "d";
|
||||
opts->descending = TRUE;
|
||||
} else
|
||||
opts->descending = FALSE;
|
||||
|
||||
}
|
||||
|
||||
if (!opts->formatstr) /* by default, use plain output */
|
||||
|
@ -203,8 +199,8 @@ config_options_group_find (MuConfig *opts)
|
|||
"show message threads", NULL},
|
||||
{"bookmark", 'b', 0, G_OPTION_ARG_STRING, &opts->bookmark,
|
||||
"use a bookmarked query", NULL},
|
||||
{"descending", 'z', 0, G_OPTION_ARG_NONE, &opts->descending,
|
||||
"sort in descending order (z -> a)", NULL},
|
||||
{"reverse", 'z', 0, G_OPTION_ARG_NONE, &opts->reverse,
|
||||
"sort in reverse (descending) order (z -> a)", NULL},
|
||||
{"summary", 'k', 0, G_OPTION_ARG_NONE, &opts->summary,
|
||||
"include a short summary of the message (false)", NULL},
|
||||
{"linksdir", 0, 0, G_OPTION_ARG_STRING, &opts->linksdir,
|
||||
|
|
|
@ -111,7 +111,7 @@ struct _MuConfig {
|
|||
/* options for querying 'find' (and view-> 'summary') */
|
||||
char *fields; /* fields to show in output */
|
||||
char *sortfield; /* field to sort by (string) */
|
||||
gboolean descending; /* sort descending (z->a)? */
|
||||
gboolean reverse; /* sort in revers order (z->a) */
|
||||
gboolean threads; /* show message threads */
|
||||
gboolean summary; /* include a summary? */
|
||||
char *bookmark; /* use bookmark */
|
||||
|
|
|
@ -296,7 +296,7 @@ mu_query_preprocess (const char *query)
|
|||
|
||||
MuMsgIter*
|
||||
mu_query_run (MuQuery *self, const char* searchexpr, gboolean threads,
|
||||
MuMsgFieldId sortfieldid, gboolean ascending,
|
||||
MuMsgFieldId sortfieldid, gboolean reverse,
|
||||
GError **err)
|
||||
{
|
||||
g_return_val_if_fail (self, NULL);
|
||||
|
@ -311,8 +311,7 @@ mu_query_run (MuQuery *self, const char* searchexpr, gboolean threads,
|
|||
* there, and don't let Xapian do any sorting */
|
||||
if (!threads && sortfieldid != MU_MSG_FIELD_ID_NONE)
|
||||
enq.set_sort_by_value ((Xapian::valueno)sortfieldid,
|
||||
ascending ? true : false);
|
||||
|
||||
reverse ? true : false);
|
||||
if (!mu_str_is_empty(searchexpr)) /* NULL or "" */
|
||||
enq.set_query(get_query (self, searchexpr, err));
|
||||
else
|
||||
|
|
|
@ -73,8 +73,8 @@ char* mu_query_version (MuQuery *store)
|
|||
* @param threads calculate message-threads
|
||||
* @param sortfield the field id to sort by or MU_MSG_FIELD_ID_NONE if
|
||||
* sorting is not desired
|
||||
* @param ascending if TRUE sort in ascending (A-Z) order, otherwise,
|
||||
* sort in descending (Z-A) order
|
||||
* @param reverse if TRUE, sort in descending (Z-A) order, otherwise,
|
||||
* sort in descending (A-Z) order
|
||||
* @param err receives error information (if there is any); if
|
||||
* function returns non-NULL, err will _not_be set. err can be NULL
|
||||
* possible error (err->code) is MU_ERROR_QUERY,
|
||||
|
|
Loading…
Reference in New Issue