We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caae3b5 commit 75c73e9Copy full SHA for 75c73e9
cmd2/pt_utils.py
@@ -176,6 +176,7 @@ def add_command(self, string: str) -> None:
176
177
Ensures consecutive duplicates are not stored.
178
"""
179
+ # self._loaded_strings is sorted newest to oldest, so we compare to the first element.
180
if string and (not self._loaded_strings or self._loaded_strings[0] != string):
181
super().append_string(string)
182
0 commit comments