unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* argument parsing refactor, add shared options
@ 2015-04-05 20:59 David Bremner
  2015-04-05 20:59 ` [PATCH 1/4] cli: ignore config argument of notmuch_help_command David Bremner
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: David Bremner @ 2015-04-05 20:59 UTC (permalink / raw)
  To: notmuch

As part of ongoing hacking on Austin's revision tracking patches, I
wanted to add an option to (almost) all subcommands. One thing led to
another and this series emerged. By itself, the gain in functionality
is probably not worthwhile (yay, we can type notmuch subcommand
--version), but internally it makes it easy to add further "global
options" that are accepted as

% notmuch --option [subcommand]

and

% notmuch subcommand --option

it would make sense, e.g. for --quiet and --verbose to be supported
this way.

Whatever people think about the shared options, I think the
refactoring of notmuch_help_command is probably worthwhile as it is
pretty simple and improves the readability of that code.

Although there are other ways of doing so, patch 4 of this series also
fixes a UI bug encountered by Rob recently, where "--config" is silently ignored
in

	notmuch setup --config=/tmp/foo.conf

In principle this series will need a documentation update, but note that

   notmuch search --help

is already undocumented.

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-06-02  4:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05 20:59 argument parsing refactor, add shared options David Bremner
2015-04-05 20:59 ` [PATCH 1/4] cli: ignore config argument of notmuch_help_command David Bremner
2015-04-05 20:59 ` [PATCH 2/4] cli: refactor notmuch_help_command David Bremner
2015-04-05 20:59 ` [PATCH 3/4] cli: define shared options, use for --help and --version David Bremner
2015-04-05 20:59 ` [PATCH 4/4] cli: add standard option processing to config and setup David Bremner
2015-04-05 21:34   ` David Bremner
2015-04-06 12:22     ` argument parsing refactoring, round 2 David Bremner
2015-04-06 12:22       ` [Patch v2 1/4] cli: ignore config argument of notmuch_help_command David Bremner
2015-04-06 12:22       ` [Patch v2 2/4] cli: refactor notmuch_help_command David Bremner
2015-04-06 12:22       ` [Patch v2 3/4] cli: define shared options, use for --help and --version David Bremner
2015-04-07  7:22         ` Mark Walters
2015-04-06 12:22       ` [Patch v2 4/4] cli: add standard option processing to config and setup David Bremner
2015-04-07  7:24         ` Mark Walters
2015-04-07 10:20           ` David Bremner
2015-04-07  7:19       ` argument parsing refactoring, round 2 Mark Walters
2015-04-07 19:30         ` argument parsing refactoring round3 David Bremner
2015-04-07 19:30           ` [PATCH 1/4] cli: ignore config argument of notmuch_help_command David Bremner
2015-04-07 19:30           ` [PATCH 2/4] cli: refactor notmuch_help_command David Bremner
2015-04-07 19:30           ` [PATCH 3/4] cli: define shared options, use for --help and --version David Bremner
2015-04-07 19:30           ` [PATCH 4/4] cli: add standard option processing to config, help and setup David Bremner
2015-04-08 14:14             ` [PATCH] fixup! " David Bremner
2015-04-08 14:31           ` argument parsing refactoring round3 guyzmo
2015-04-08 23:53             ` David Bremner
2015-04-11  0:01               ` David Bremner
2015-04-25 19:56                 ` Tomi Ollila
2015-06-02  4:43           ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).