[RFC] Condense help listings
Aaron Bentley
aaron.bentley at utoronto.ca
Sun Sep 24 17:12:10 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> I wonder about changing it to:
>
> baz-import <bzrtools> Import an Arch or Baz...
I thought the description would be the most interesting thing for
people, most of the time, so I stuck the plugin at the end.
> And probably (bzrtools) might be nicer. So I'm happy with the single
> line entries, it makes things look less cluttered.
Parentheses are used in regular command descriptions, so I thought that
would be confusing. Perhaps "[bzrtools]"?
> v- Small thing: You don't need the extra [], since 'max()' works just
> fine on a generator:
> max_name = max(len(n) for n, o in commands if not o.hidden)
Okay. I've tweaked this so the list of commands to show is created in
one place and reused.
> Also, you can use "%-*s %s%s" % (max_name, name, plugin_name)
> Rather than having to generate the format string ahead of time, and
> double escaping all of the % characters.
Done.
> You're format string also is creating a trailing ' ' when the plugin
> name is empty
Fixed.
> + for line in lines:
> + print >> outfile, line
>
> I really prefer 'outfile.write(line)' to print >> outfile, line
> It means changing the format string to have a trailing '\n', but that
> shouldn't be to hard. (For all I know, textwrap already does that).
Actually, it meant changing every line to end with '\n'.
> A couple small cleanups and it has my go ahead. I think it is a little
> late for 0.11, though.
Agreed.
I've attached a patch that should address your technical concerns.
I'd like to hear what other people think, especially about how we should
identify commands from plugins.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFFq5a0F+nu1YWqI0RAo9KAJsEvzlgXYHe0QE+X/F2/uBbajceMwCfdntR
c1EtdBr8M1k1JT89xTIoIok=
=lfSD
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helptext.patch
Type: text/x-patch
Size: 2042 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060924/9997a6d4/attachment.bin
More information about the bazaar
mailing list