compuphase / Black-Magic-Probe-Book

A guide plus associated utilities for the Black Magic Probe.
Apache License 2.0
147 stars 26 forks source link

Command History Issue #36 #37

Closed d-adamson closed 1 year ago

d-adamson commented 1 year ago

Hi, Here are proposed modifications for issue #36 (command history not working).

When there was no prior command history (ex after a fresh install), the history was not initialized. => Corrected

Also, the command history functions a bit differently. All the commands are now stored in the order they were executed, except when the current command = the previous command. This helps to make the order of past commands more understandable. Previously, I would up-arrow expecting to see my last command, but it would show me a command that had been executed further back in the past.

Attached are a couple of example ini files that show the difference in how commands are stored. In bmdebug-org-hist.ini.txt => all commands are stored only once, but the order of retrieval could be confusing. In bmdebug-new-hist.ini.txt => all commands are stored in the order executed unless it is a repeat of the previous command.

bmdebug-new-hist.ini.txt bmdebug-org-hist.ini.txt

Lastly, A couple of files were updated for developing under Linux .vscode/launch.json => added Linux debug config .gitignore => ignores Linux binaries and Linux-specific make files

compuphase commented 1 year ago

Thank you for this improvement. This is clearly a better approach than my implementation.