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

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

Date:Mon, 27 Apr 2020 14:53:07 -0300

To:Ciprian Dorin Craciun ,notmuch@notmuchmail.org

Cc:

From:David Bremner


Ciprian Dorin Craciun <ciprian.craciun@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@volution.ro'
> notmuch show --format json --entire-thread true --body=false --
> 'ciprian@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.

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: