[PATCH] verbose help (show plugin providing a cmd and hidden cmds)
Michael Ellerman
michael at ellerman.id.au
Sun Jun 18 09:43:32 BST 2006
On 6/18/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Michael Ellerman wrote:
> > On 6/17/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
>
> ...
>
> >
> > I took Robert's patched and re-jiggered it a bit, plus I added a test.
> > Output looks like:
> >
> > concordia ~/src/bzr/branches/mpe$ ./bzr help diff
> > usage: bzr diff [FILE...]
> > aliases: di, dif
> >
> > (From plugin "difftools")
> >
> > Show differences in working tree.
> >
> > concordia ~/src/bzr/branches/mpe$ ./bzr help commands
> > ...
> > bzr diff [FILE...]
> > (From plugin "difftools")
> > Show differences in working tree.
> >
> > Bundle attached, or it's at http://michael.ellerman.id.au/bzr/branches/mpe
> >
> > cheers
> >
>
> I like the output, but I have just one comment:
>
>
> ...
>
> >
> > +def print_command_plugin(cmd_object, outfile, format):
> > + plugin_name = cmd_object.plugin_name()
> > + if plugin_name is not None:
> > + print >>outfile, format % ('(From plugin "%s")' % plugin_name)
> > +
> > +
>
> I don't really don't like the double expansion. I would prefer to see:
>
> if plugin_name is not None:
> out_str = '(From plugin "%s")' % plugin_name
> print >>outfile, format % out_str
Ok, I've fixed it and repushed.
cheers
More information about the bazaar
mailing list