aboutsummaryrefslogtreecommitdiffhomepage
path: root/command-line-arguments.c
Commit message (Collapse)AuthorAge
* cli: make the command line parser's errors more informative.Gravatar Mark Walters2012-09-01
| | | | | | | | | | | 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.
* cli: command line parsing: allow default for keyword optionsGravatar Mark Walters2012-06-29
| | | | | | | 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).
* cli: Parsing. Allow true/false parameter for boolean options.Gravatar Mark Walters2012-03-18
| | | | | | 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.
* command-line-arguments.[ch]: make arrays of keyword descriptors constGravatar David Bremner2011-12-13
| | | | | It seems like it should never be necessary to modify these arrays after initialization.
* command-line-arguments.[ch]: new argument parsing framework for notmuch.Gravatar David Bremner2011-12-08
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.