Inconsistencies in handling command flags: `--flag=value` different than `--flag value`

David Bremner david at tethera.net
Mon Apr 27 10:53:07 PDT 2020


Ciprian Dorin Craciun <ciprian.craciun at gmail.com> writes:

> [Again sorry for double reporting.  BTW, where should I search for
> previous bugs?  I've currently tried the mailing list archive.]

Another option is

        https://nmbug.notmuchmail.org/status

This is just pointers into the mailing archive, but triaged.

>
> Trying to play with `notmuch` from a wrapper, I've stumbled upon the
> following command line flags handling bug:
>
> ~~~~
> notmuch show --format json --entire-thread true --body false --
> 'ciprian at volution.ro'
> notmuch show --format json --entire-thread true --body=false --
> 'ciprian at volution.ro'

Quoting notmuch(1)

   OPTION SYNTAX
       All options accepting an argument can be used with '='
       or ':' as a separator. For the cases where it's not ambiguous
       (in particular excluding boolean options), a space can also be
       used.

So what you are seeing is a side effect of "--entire-thread true" not
being supported syntax.

You can see what's happening with

 NOTMUCH_DEBUG_QUERY=t notmuch show --format json --entire-thread true djkldsfjkl

the "true" is considered the first search term.

In your example you could just delete the "true" to switch on the
option.



More information about the notmuch mailing list