'history [-l]
Short-cut command for set cli.history = 1/0.
Add -l to just list the history.'

def do_history(self, line):

    c = self.myparseline(line)
    if ('-l' in c[0]):
        i = 0
        while (i < readline.get_current_history_length()):
            self.dprint(readline.get_history_item(i), plain=True)
            i += 1
        return
    if self.ownopts['cli.history']:
        val = '0'
    else:
        val = '1'
    return self.do_set(('cli.history    =    ' + val))
