Index: subcommand.py |
diff --git a/subcommand.py b/subcommand.py |
index 0201c90aa35d61a17252fd4eeb1e227bd76375d3..79dcb7ac3e759158a308f265c089bf5b11018342 100644 |
--- a/subcommand.py |
+++ b/subcommand.py |
@@ -128,8 +128,9 @@ class CommandDispatcher(object): |
and/or incomplete names. |
""" |
commands = self.enumerate_commands() |
- if name_asked in commands: |
- return commands[name_asked] |
+ underscore = name_asked.replace('_', '-') |
ghost stip (do not use)
2015/04/07 16:50:18
maybe rename to 'underscored' or something?
M-A Ruel
2015/04/07 17:07:14
'underscored or something' is not a valid python s
|
+ if underscore in commands: |
+ return commands[underscore] |
# An exact match was not found. Try to be smart and look if there's |
# something similar. |