<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/command-line-arguments.c, branch 0.23.4</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.23.4</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.23.4'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2014-11-05T22:17:00Z</updated>
<entry>
<title>cli: add support for hierarchical command line option arrays</title>
<updated>2014-11-05T22:17:00Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-11-05T00:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4387112de00d27e6957ca2b6a268242f0bb5c756'/>
<id>urn:sha1:4387112de00d27e6957ca2b6a268242f0bb5c756</id>
<content type='text'>
NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
output_var.

The "Unrecognized option" message was moved out of parse_option() to
not be emitted twice or when parsing a non-inherited option.
</content>
</entry>
<entry>
<title>cli: Add support for parsing keyword-flag arguments</title>
<updated>2014-11-01T07:02:21Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-10-31T21:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ecc4a9a6441a3b7011d9afb2ca67e9d4ea1fca48'/>
<id>urn:sha1:ecc4a9a6441a3b7011d9afb2ca67e9d4ea1fca48</id>
<content type='text'>
This allows having multiple --foo=bar --foo=baz options on the command
line, with the corresponding values OR'd together.

[Test added by Michal Sojka]
</content>
</entry>
<entry>
<title>cli: command line option parser cleanup</title>
<updated>2014-02-26T00:53:41Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-02-24T21:36:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6960b92bb6ccbacd9904e2d12775a7c68b2d8801'/>
<id>urn:sha1:6960b92bb6ccbacd9904e2d12775a7c68b2d8801</id>
<content type='text'>
Reduce the indentation for clarity. No functional changes.
</content>
</entry>
<entry>
<title>cli: make the command line parser's errors more informative.</title>
<updated>2012-09-02T02:03:36Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2012-06-05T14:36:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ab1487363edec7e0d89157b69634703beab622dc'/>
<id>urn:sha1:ab1487363edec7e0d89157b69634703beab622dc</id>
<content type='text'>
Previously, the cli parser was a little erratic in what errors it
reported and would fail silently in many cases (for example, when no
argument was passed to an integer option). This was particularly
annoying as the user could not (easily) tell whether the command
failed or just there were no search results.

This patch tries to make the handling consistent and return a helpful
error message in all cases.
</content>
</entry>
<entry>
<title>cli: command line parsing: allow default for keyword options</title>
<updated>2012-06-30T01:31:40Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2012-06-16T10:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=779ce3e9300c8f656e798ee77459b4425dbf35a6'/>
<id>urn:sha1:779ce3e9300c8f656e798ee77459b4425dbf35a6</id>
<content type='text'>
This changes the parsing for "keyword" options so that if the option
is specified with no argument the argument is parsed as if it were
passed an empty string. This make it easier to add options to existing
boolean arguments (the existing --option can default to TRUE).
</content>
</entry>
<entry>
<title>cli: Parsing. Allow true/false parameter for boolean options.</title>
<updated>2012-03-18T12:14:22Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2012-03-10T11:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b3e4417897f5b27883513c4714f7e84e377b5f5b'/>
<id>urn:sha1:b3e4417897f5b27883513c4714f7e84e377b5f5b</id>
<content type='text'>
Allow NOTMUCH_OPT_BOOLEAN to take a true or false parameter.  In
particular it allows the user to turn off a boolean option with
--option=false.
</content>
</entry>
<entry>
<title>command-line-arguments.[ch]: make arrays of keyword descriptors const</title>
<updated>2011-12-13T04:00:44Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2011-12-13T03:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f717d2ece1836c863f9cc02abd1ff2539307cd1d'/>
<id>urn:sha1:f717d2ece1836c863f9cc02abd1ff2539307cd1d</id>
<content type='text'>
It seems like it should never be necessary to modify these arrays after
initialization.
</content>
</entry>
<entry>
<title>command-line-arguments.[ch]: new argument parsing framework for notmuch.</title>
<updated>2011-12-09T00:24:24Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2011-12-01T00:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2cf7b27a0c4b4e746e2e40752c55ddb4d54798b2'/>
<id>urn:sha1:2cf7b27a0c4b4e746e2e40752c55ddb4d54798b2</id>
<content type='text'>
As we noticed when Jani kindly converted things to getopt_long, much
of the work in argument parsing in notmuch is due to the the key-value
style arguments like --format=(raw|json|text).

The framework here provides positional arguments, simple switches,
and --key=value style arguments that can take a value being an integer,
a string, or one of a set of keywords.
</content>
</entry>
</feed>
