[PATCH v5 07/12] insert: add --folder option

Peter Wang novalazy at gmail.com
Sat Apr 27 19:00:38 PDT 2013


On Sun, 28 Apr 2013 00:32:47 +0300, Jani Nikula <jani at nikula.org> wrote:
> > +    notmuch_opt_desc_t options[] = {
> > +	{ NOTMUCH_OPT_STRING, &folder, "folder", 0, 0 },
> > +	{ NOTMUCH_OPT_END, 0, 0, 0, 0 }
> > +    };
> > +
> > +    opt_index = parse_arguments (argc, argv, options, 1);
> > +
> > +    if (opt_index < 0) {
> > +	fprintf (stderr, "Error: bad argument to notmuch insert: %s\n",
> > +		 argv[-opt_index]);
> 
> I'm too tired to check what's correct, but argv[-opt_index] isn't.

Nice catch.  I'll just delete that message as parse_arguments
already prints a message, like other callers.

Peter


More information about the notmuch mailing list