AgonConsole8 / agon-mos

Official AGON QUARK Firmware for Console8: eZ80 MOS
MIT License
25 stars 10 forks source link

Don't push repeated commands to CLI history #24

Open stevesims opened 10 months ago

stevesims commented 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?

badre2911 commented 7 months ago

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.