From 796b629c3b821986c1f8d9a9e6f952a1df1034f0 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 15 Nov 2011 22:08:49 +0200 Subject: cli: add options --offset and --limit to notmuch search Add options --offset=[-]N and --limit=M to notmuch search to determine the first result and maximum number of results to display. Option --limit=M limits the maximum number of results to display to M. Option --offset=[-]N skips the first N results; with the leading '-' skip until the Nth result from the end. Note that --offset with a negative N for thread or summary output requires counting the number of matching threads in advance. Signed-off-by: Jani Nikula --- notmuch.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'notmuch.c') diff --git a/notmuch.c b/notmuch.c index e004c6c5..394371d9 100644 --- a/notmuch.c +++ b/notmuch.c @@ -222,6 +222,15 @@ static command_t commands[] = { "\t\t(oldest-first) or reverse chronological order\n" "\t\t(newest-first), which is the default.\n" "\n" + "\t--offset=[-]N\n" + "\n" + "\t\tSkip displaying the first N results. With the leading '-',\n" + "\t\tstart at the Nth result from the end.\n" + "\n" + "\t--limit=N\n" + "\n" + "\t\tLimit the number of displayed results to N.\n" + "\n" "\tSee \"notmuch help search-terms\" for details of the search\n" "\tterms syntax." }, { "show", notmuch_show_command, -- cgit v1.2.3