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().