[PATCH]: Optional explanation for options

Jan Hudec bulb at ucw.cz
Wed Sep 7 15:00:16 BST 2005


On Wed, Sep 07, 2005 at 21:31:58 +1000, Robert Collins wrote:
> On Wed, 2005-09-07 at 09:04 +0100, Magnus Therning wrote:
> > The following patch makes it possible to add explanations to options for
> > commands. E.g.
> > 
> > class cmd_my_command(Command):
> >     ...
> >     takes_options = [('revision', 'Retrieve particular revision')]
> >     ...
> > 
> > I think it'd be handy for command line completion...
> 
> So, we have the ability at the moment to introspect to determine
> argument and option types. Do you think that adding the explanation to
> the list of OPTIONS and ARGUMENTS globally would be reasonable? I mean -
> does the intent vary without the type varying?

It does not need to vary to be useful. It allows the whole help to be
introspectible, so shell completition can print relevant parts (at least zsh
can do it).

--
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050907/d8a9d3c8/attachment.pgp 


More information about the bazaar mailing list