Open stevesims opened 10 months ago
If the last command entered is a repeat of the one before, don't push it to history
Also consider - if the last command entered was previously entered, then maybe move that command to last history entry instead of pushing a copy?
I suppose that the history is put in a table (array), you just have to see if it already exists in this table, if it does not exist we do not insert it in the history table.
If the last command entered is a repeat of the one before, don't push it to history
Also consider - if the last command entered was previously entered, then maybe move that command to last history entry instead of pushing a copy?