Show full command name in help output
authorJeremy Stanley <fungi@yuggoth.org>
Thu, 9 May 2019 20:18:13 +0000 (20:18 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Thu, 9 May 2019 20:18:13 +0000 (20:18 +0000)
When help is requested on an abbreviated command, include the full
name (rather than the provided abbreviation) in the synopsis.

mudpy/command.py

index 95fb793..250fb6f 100644 (file)
@@ -161,7 +161,8 @@ def help(actor, parameters):
                 output = "$(red)"
             else:
                 output = "$(grn)"
-            output += parameters + "$(nrm) - " + description + "$(eol)$(eol)"
+            output = "%s%s$(nrm) - %s$(eol)$(eol)" % (
+                output, command.subkey, description)
 
             # add the help text if provided
             help_text = command.get("help")