New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add history exclusion configuration #518
Conversation
Doing the string match internally is certainly the minimally invasive change. How will this interact with the data amending as done for the sqlite history? |
@sholderbach I don't think there's any special handling for SQLite history needed, because all the logic is happening in engine.rs. Perhaps I've missed something? |
Oops! Will take a look and try to add some tests, thanks. |
Hm. Y'know, I'm not sure whether that's a bug. A case could be made that the demo is intentionally not handling that edge case (where the very first command is ignored) well: Line 130 in 076ce6f
Do you have a suggested way forward? |
I think this rather indicates even with ignoring error handling that https://docs.rs/reedline/latest/reedline/struct.Reedline.html#method.update_last_command_context would try to modify the last remembered entry. |
Right. I don't see the problem but I'm probably missing something. edit: Oh, I think I get it now. I guess we might modify the wrong entry. :( |
current status: I'm not really sure what the best way to implement this is. Might need to start storing the last command in memory instead of always looking it up in the DB. I've run out of steam to work on this for now but might come back to it another time; if anyone else wants to pick it up feel free. |
Closed by #566 |
A rough draft PR to solve #516, by letting users configure which command lines get excluded from history. For example, users can configure reedline so that command lines starting with a space are not saved.
@sholderbach Let me know what you think, happy to revise this.