1658 self.__history.append(cmd) |
1658 self.__history.append(cmd) |
1659 if self.__historyStyle == ShellHistoryStyle.LinuxStyle: |
1659 if self.__historyStyle == ShellHistoryStyle.LinuxStyle: |
1660 self.__setHistoryIndex(index=-1) |
1660 self.__setHistoryIndex(index=-1) |
1661 elif self.__historyStyle == ShellHistoryStyle.WindowsStyle: |
1661 elif self.__historyStyle == ShellHistoryStyle.WindowsStyle: |
1662 if historyIndex is None: |
1662 if historyIndex is None: |
1663 if bool(self.__histidx - 1) and \ |
1663 if self.__histidx - 1 > 0 and \ |
1664 cmd != self.__history[self.__histidx - 1]: |
1664 cmd != self.__history[self.__histidx - 1]: |
1665 self.__setHistoryIndex(index=-1) |
1665 self.__setHistoryIndex(index=-1) |
1666 else: |
1666 else: |
1667 self.__setHistoryIndex(historyIndex) |
1667 self.__setHistoryIndex(historyIndex) |
1668 |
1668 |