rust-embedded-community / menu

Command-line menu system for embedded Rust platforms.
Apache License 2.0
51 stars 11 forks source link

History #6

Open thejpster opened 5 years ago

thejpster commented 5 years ago

Should implement history - as much as fits in the given buffer (including the current line, if anything has been entered).

thejpster commented 5 years ago

So, we treat the byte slice as a ring buffer. We put a special delimiter in in-between each command. This lets us wind backwards and find the previous command when a user presses up. Once the buffer is full, we delete whole commands at a time from the trail to make space.