projects
/
mw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
768bad6
)
Fix usage() from duplicating shortcuts as commands
author
Ian Weller
<ian@ianweller.org>
Fri, 18 Dec 2009 16:51:16 +0000
(10:51 -0600)
committer
Ian Weller
<ian@ianweller.org>
Fri, 18 Dec 2009 16:51:16 +0000
(10:51 -0600)
src/mw/cli.py
patch
|
blob
|
history
diff --git
a/src/mw/cli.py
b/src/mw/cli.py
index e1d96c0be19141ccc5f6d62b2b2b20c7cf3e9504..a822ff24c371eaa499f993c97e49725fa0ef7d73 100644
(file)
--- a/
src/mw/cli.py
+++ b/
src/mw/cli.py
@@
-21,6
+21,7
@@
import inspect
import mw.clicommands
import os
import sys
import mw.clicommands
import os
import sys
+from pprint import pprint
class CLI(object):
def __init__(self):
class CLI(object):
def __init__(self):
@@
-36,7
+37,8
@@
class CLI(object):
cmd = clazz()
self.commands[cmd.name] = cmd
self.shortcuts[cmd.name] = cmd.shortcuts
cmd = clazz()
self.commands[cmd.name] = cmd
self.shortcuts[cmd.name] = cmd.shortcuts
- self.all_commands = self.commands
+ self.all_commands = {}
+ self.all_commands.update(self.commands)
for command in self.shortcuts:
for shortcut in self.shortcuts[command]:
self.all_commands[shortcut] = self.commands[command]
for command in self.shortcuts:
for shortcut in self.shortcuts[command]:
self.all_commands[shortcut] = self.commands[command]
Benjamin Mako Hill
||
Want to submit a patch?