Ejemplo n.º 1
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "upload" and otherwise delegates to the BaseControl
     """
     m = RE.match(line)
     if m:
         return self._complete_file(RE.sub('', line))
     else:
         return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 2
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "upload" and otherwise delegates to the BaseControl
     """
     m = RE.match(line)
     if m:
         return self._complete_file(RE.sub('', line))
     else:
         return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 3
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "deploy", "start", or "startasync"
     and otherwise delegates to the BaseControl
     """
     for s in (" deploy ", " start ", " startasync "):
         l = len(s)
         i = line.find(s)
         if i >= 0:
             f = line[i + l:]
             return self._complete_file(f)
     return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 4
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "deploy", "start", or "startasync"
     and otherwise delegates to the BaseControl
     """
     for s in (" deploy ", " start ", " startasync "):
         l = len(s)
         i = line.find(s)
         if i >= 0:
             f = line[i+l:]
             return self._complete_file(f)
     return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 5
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "upload" and otherwise delegates to the BaseControl
     """
     for RE in (RE1, RE0):
         m = RE.match(line)
         if m:
             replaced = RE.sub('', line)
             suggestions = self._complete_file(replaced, os.getcwd())
             if False: #line.find("--official") < 0:
                 add = "--official"
                 parts = line.split(" ")
                 if "--official".startswith(parts[-1]):
                     new = add[len(parts[-1]):]
                     if new:
                         add = new
                 suggestions.insert(0, add)
             return suggestions
     return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 6
0
 def _complete(self, text, line, begidx, endidx):
     """
     Returns a file after "upload" and otherwise delegates to the BaseControl
     """
     for RE in (RE1, RE0):
         m = RE.match(line)
         if m:
             replaced = RE.sub('', line)
             suggestions = self._complete_file(replaced, os.getcwd())
             if False:  #line.find("--official") < 0:
                 add = "--official"
                 parts = line.split(" ")
                 if "--official".startswith(parts[-1]):
                     new = add[len(parts[-1]):]
                     if new:
                         add = new
                 suggestions.insert(0, add)
             return suggestions
     return BaseControl._complete(self, text, line, begidx, endidx)
Ejemplo n.º 7
0
 def testArgs(self):
     c = BaseControl()
     c._oneArg("a")
     c("a")
Ejemplo n.º 8
0
 def testNoArgs(self):
     c = BaseControl()
     c._noargs()
     c()
Ejemplo n.º 9
0
 def testArgs(self):
     c = BaseControl()
     c._oneArg("a")
     c("a")
Ejemplo n.º 10
0
 def testNoArgs(self):
     c = BaseControl()
     c._noargs()
     c()