daniele77 / cli

A library for interactive command line interfaces in modern C++
Boost Software License 1.0
1.23k stars 140 forks source link

Option to store only successful commands in history? #231

Open pkbehera opened 8 months ago

pkbehera commented 8 months ago

I see that the history is storing all command in it, known, unknown and the ones that return errors.

Is there an option to store only the commands that run successfully?

daniele77 commented 8 months ago

This design decision mirrors the behavior of tools like the bash shell, which keeps a history of commands. This can be helpful for situations like accidentally misspelling a command, where you can easily recall it, correct it, and resend it.

Unfortunately, there isn't currently an option to disable this history feature.

pkbehera commented 8 months ago

In bash shell any command starting with whitespaces does not go into the history; is the same supported here?

Also, in bash shell there is option to store only unique commands in the history; is that possible here too?

daniele77 commented 7 months ago

While not yet supported, these features are something we're considering for future development. Our development roadmap is heavily influenced by user feedback. You can upvote feature requests, and your input directly impacts what we prioritize. Additionally, donations can help us accelerate development efforts.