Implicitly support abbreviating commands
[mudpy.git] / mudpy / command.py
index ebd9036..95fb793 100644 (file)
@@ -148,10 +148,7 @@ def help(actor, parameters):
     if parameters and actor.owner:
 
         # is the command word one for which we have data?
-        if parameters in actor.universe.groups["command"]:
-            command = actor.universe.groups["command"][parameters]
-        else:
-            command = None
+        command = mudpy.misc.find_command(parameters)
 
         # only for allowed commands
         if actor.can_run(command):
@@ -237,6 +234,10 @@ def move(actor, parameters):
 
 def preferences(actor, parameters):
     """List, view and change actor preferences."""
+
+    # Escape replacement macros in preferences
+    parameters = mudpy.misc.escape_macros(parameters)
+
     message = ""
     arguments = parameters.split()
     allowed_prefs = set()