def METHOD_NAME(self, source):
    "Store Shell input statement into history list."
    source = source.strip()
    if len(source) > 2:
        # avoid duplicates
        try:
            self.history.remove(source)
        except ValueError:
            pass
        self.history.append(source)
    self.pointer = None
    self.prefix = None