Rework Plugin.commands() to include _setup_commands().
[hooke.git] / hooke / plugin / system.py
index 42e9cbe3a11bd0db7e382f032aab99930eee9b5c..185fa8e44cd312b5bbbedf6e00e82b165af253ca 100644 (file)
@@ -33,10 +33,10 @@ from ..plugin import Builtin
 class SystemPlugin (Builtin):
     def __init__(self):
         super(SystemPlugin, self).__init__(name='system')
-
-    def commands(self):
-        return [ListDirectoryCommand(), GetWorkingDirectoryCommand(),
-                ChangeDirectoryCommand(), SystemCommand()]
+        self._commands = [
+            ListDirectoryCommand(), GetWorkingDirectoryCommand(),
+            ChangeDirectoryCommand(), SystemCommand()]
+        self._setup_commands()
 
 
 class ListDirectoryCommand (Command):