'Command completion for mark command.'

def complete_mark(self, text, line, arglist, state, begidx, endidx):

    itemList = [str(i) for (i, item) in enumerate(sorted(self.session.get_itemlist()))]
    if (state == 1):
        return [i for i in itemList if i.startswith(text)]
    elif (state == 2):
        if (arglist[1] not in itemList):
            return ['']
        else:
            markingList = ['READY', 'RUNNING', 'FAIL', 'USED']
            return [item for item in markingList if item.startswith(text.upper())]
    return ['']
