Exclude --complete from completion.
authorRobert Lehmann <mail@robertlehmann.de>
Fri, 26 Nov 2010 07:34:35 +0000 (08:34 +0100)
committerRobert Lehmann <mail@robertlehmann.de>
Fri, 26 Nov 2010 07:34:35 +0000 (08:34 +0100)
libbe/command/base.py

index c6337ec904ce3e3b012792859a05c4ebfdbf63f6..4814a176d26e55cdb5ed935a973d121fe4ebe135 100644 (file)
@@ -335,7 +335,8 @@ class Command (object):
 
     def complete(self, argument=None, fragment=None):
         if argument == None:
-            ret = ['--%s' % o.name for o in self.options]
+            ret = ['--%s' % o.name for o in self.options
+                    if o.name != 'complete']
             if len(self.args) > 0 and self.args[0].completion_callback != None:
                 ret.extend(self.args[0].completion_callback(self, argument, fragment))
             return ret