[PATCH] cli: change argument parsing convention for subcommands

2011-10-22 Thread David Bremner
On Sat, 22 Oct 2011 19:08:50 +0200, Thomas Schwinge wrote: > > It seems that notmuch.c:notmuch_help_command also needs to be adapted? > Thanks Thomas. I pushed a version which doesn't break the help command completely ;). d

[PATCH] cli: change argument parsing convention for subcommands

2011-10-22 Thread Thomas Schwinge
Hi! On Fri, 21 Oct 2011 09:19:17 -0300, david at tethera.net wrote: > previously we deleted the subcommand name from argv before passing to > the subcommand. In this version, the deletion is done in the actual > subcommands. Although this causes some duplication of code, it allows > us to be more

Re: [PATCH] cli: change argument parsing convention for subcommands

2011-10-22 Thread Thomas Schwinge
Hi! On Fri, 21 Oct 2011 09:19:17 -0300, da...@tethera.net wrote: previously we deleted the subcommand name from argv before passing to the subcommand. In this version, the deletion is done in the actual subcommands. Although this causes some duplication of code, it allows us to be more

Re: [PATCH] cli: change argument parsing convention for subcommands

2011-10-22 Thread David Bremner
On Sat, 22 Oct 2011 19:08:50 +0200, Thomas Schwinge tho...@schwinge.name wrote: It seems that notmuch.c:notmuch_help_command also needs to be adapted? Thanks Thomas. I pushed a version which doesn't break the help command completely ;). d ___

[PATCH] cli: change argument parsing convention for subcommands

2011-10-21 Thread Jameson Graef Rollins
On Fri, 21 Oct 2011 09:19:17 -0300, david at tethera.net wrote: > What to people think about this? It is a bit intrusive, but I think > everyone is sick of writing ad-hoc argument parsing code. The larger goal seems like a good one to me, and if this helps on that front I certainly don't see any

[PATCH] cli: change argument parsing convention for subcommands

2011-10-21 Thread da...@tethera.net
From: David Bremner previously we deleted the subcommand name from argv before passing to the subcommand. In this version, the deletion is done in the actual subcommands. Although this causes some duplication of code, it allows us to be more flexible about how we parse

[PATCH] cli: change argument parsing convention for subcommands

2011-10-21 Thread david
From: David Bremner brem...@debian.org previously we deleted the subcommand name from argv before passing to the subcommand. In this version, the deletion is done in the actual subcommands. Although this causes some duplication of code, it allows us to be more flexible about how we parse command

Re: [PATCH] cli: change argument parsing convention for subcommands

2011-10-21 Thread Jameson Graef Rollins
On Fri, 21 Oct 2011 09:19:17 -0300, da...@tethera.net wrote: What to people think about this? It is a bit intrusive, but I think everyone is sick of writing ad-hoc argument parsing code. The larger goal seems like a good one to me, and if this helps on that front I certainly don't see any