def complete(self,text,state):
        try:
            import readline
        except ImportError:
            return None
        line = readline.get_line_buffer()
        if line == '':
            results = [i+' ' for i in self.vocab if i.startswith(text)]+[None]
            return results[state]
        else:
            exp = line.split()[0]
            if ['start','stop','restart','clear','status','tail','fg','pid'] in exp:
                if not line.endswith(' ') and len(line.split()) == 1:
                    return [text + ' ', None][state]
                if exp == 'fg':
                    if line.endswith(' ') and len(line.split()) > 1:
                        return None
                results = self.completionmatches(text,line)+[None]
                return results[state]
            elif exp in ['maintail','pid','reload','shutdown','exit','open',
                         'quit','version','EOF']:
                return None
            elif exp == 'help':
                if line.endswith(' ') and len(line.split()) > 1:
                    return None
                results=[i+' ' for i in self.vocab if i.startswith(text)]+[None]
                return results[state]
            elif exp in ['add','remove']:
                results=self.completionmatches(text,line,flag=1)+[None]
                return results[state]
            else:
                results=[i+' ' for i in self.vocab if i.startswith(text)]+[None]
                return results[state]
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/supervisorctl.py/Controller.complete/swapped operands of `in`