Re: [PATCH 1/2] config: Add 'config list' command

Subject: Re: [PATCH 1/2] config: Add 'config list' command

Date: Thu, 22 Mar 2012 09:52:03 +1100

To: Tomi Ollila

Cc: notmuch@notmuchmail.org

From: Peter Wang


On Wed, 21 Mar 2012 20:30:43 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Wed, 21 Mar 2012 09:31:37 +1100, Peter Wang <novalazy@gmail.com> wrote:
> > Add a command to list all keys in a given configuration section.
> > 
> > One use is as follows: a MUA may prefer to store data in a central
> > notmuch configuration file so that the data is accessible across
> > different machines, e.g. an addressbook.  The list command helps
> > to implement features such as tab completion on the keys.
> 
> Before getting deeper into implementation it is good to remember
> that 'notmuch config' is loosely modeled after 'git config'.
> 
> git config --list outputs somewhat different output.
> 
> Maybe this command should be like 'notmuch config list-section-keys'

That would be fine.  The documentation never mentions keys, only
sections and items.  The implementation seems to think item == group.key.

Peter

P.S. In the first patch free() should be g_strfreev().

Thread: