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)
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)
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)