Mercurial > python-cmd2
diff docs/pycon2010/pirate8.py @ 356:d275d3beceff
fix usage help name-stripping bug
author | catherine@dellzilla |
---|---|
date | Wed, 17 Feb 2010 14:32:04 -0500 |
parents | 798c7f32a960 |
children | bf314710e64b |
line wrap: on
line diff
--- a/docs/pycon2010/pirate8.py Wed Feb 17 12:32:49 2010 -0500 +++ b/docs/pycon2010/pirate8.py Wed Feb 17 14:32:04 2010 -0500 @@ -35,8 +35,11 @@ default_to_shell = True multilineCommands = ['sing'] terminators = Cmd.terminators + ['...'] + songcolor = 'blue' + settable = Cmd.settable + 'songcolor Color to ``sing`` in (red/blue/green/cyan/magenta, bold, underline)' + Cmd.shortcuts.update({'~': 'sing'}) def do_sing(self, arg): - print(self.colorize(arg, 'blue')) + print(self.colorize(arg, self.songcolor)) @options([make_option('--ho', type='int', help="How often to chant 'ho'", default=2), make_option('-c', '--commas', action="store_true", help="Interspers commas")]) def do_yo(self, arg, opts):