Kaynağa Gözat

Fix missing commands in the completion list

Mike Naberezny 11 yıl önce
ebeveyn
işleme
ae440a09e4
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      supervisor/supervisorctl.py

+ 4 - 4
supervisor/supervisorctl.py

@@ -101,13 +101,13 @@ class Controller(cmd.Cmd):
         self.options = options
         self.prompt = self.options.prompt + '> '
         self.options.plugins = []
-        self.vocab = ['add','exit','maintail','pid','reload',
-                      'restart','start','stop','version','clear',
-                      'fg','open','quit','remove','shutdown','status',
-                      'tail','help']
+        self.vocab = ['help']
         cmd.Cmd.__init__(self, completekey, stdin, stdout)
         for name, factory, kwargs in self.options.plugin_factories:
             plugin = factory(self, **kwargs)
+            for a in dir(plugin):
+                if a.startswith('do_') and callable(getattr(plugin, a)):
+                    self.vocab.append(a[3:])
             self.options.plugins.append(plugin)
             plugin.name = name