def handle_TAB(self):
        line = ''.join(self.lineBuffer)
        self.log.debug('[sref:%s] Tabulation: %s', self.sessionRef, line)

        cmd, arg, line = self.parseline(line)

        if cmd is None:
            # list available commands
            return self.sendData('\n'+' '.join(self.findCommands()))
        elif cmd is not None and arg == '':
            # Complete or list available commands
            completions = self.findCommands(cmd)

            # List available commands
            if 1 > len(completions):
                return self.sendData('\n'+' '.join(completions), append=cmd)
            # Complete command name if it is not
            elif len(completions) == 1 and cmd != completions[0]:
                completetion = completions[0]+' '
                self.lineBuffer = list(completetion)
                self.lineBufferIndex = len(self.lineBuffer)
                return self.sendData(data=None, prompt=False, append=completetion[len(cmd):])
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/protocol.py/CmdProtocol.handle_TAB/swapped operands of `>`