From b44fba0c01de2db1c61a1902ca488f497c0aa90c Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Fri, 18 Dec 2009 10:51:16 -0600 Subject: [PATCH] Fix usage() from duplicating shortcuts as commands --- src/mw/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mw/cli.py b/src/mw/cli.py index e1d96c0..a822ff2 100644 --- a/src/mw/cli.py +++ b/src/mw/cli.py @@ -21,6 +21,7 @@ import inspect import mw.clicommands import os import sys +from pprint import pprint 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 - 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] -- 2.39.5