Skip to content
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

feat: add history prune subcommand #1743

Merged
merged 1 commit into from
Feb 21, 2024
Merged

feat: add history prune subcommand #1743

merged 1 commit into from
Feb 21, 2024

Conversation

xvello
Copy link
Contributor

@xvello xvello commented Feb 20, 2024

Closes #1742 by implementing the new atuin history prune subcommand discussed in this issue. This command defaults to removing matching lines, which can be previewed via the --dry-run command flag.

TODO:

  • tests: tested manually without sync. I am reusing the search --delete code path, so remote deletes should work? I'd like to add a black-box test in atuin/tests/ to add a few history entries then prune part of them, but is it desirable?
  • confirmation prompt: we could add a confirmation prompt before we delete the entries. Are there similar prompts I could reuse? Feel free to directly push the code for it.
  • documentation: in the https://github.com/atuinsh/docs repo?

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you!

If we could also get an update to the docs, that would be greatly appreciated 🙏

https://github.com/atuinsh/docs

@ellie ellie merged commit 3c375ca into atuinsh:main Feb 21, 2024
15 checks passed
@xvello xvello deleted the xvello/prune branch February 21, 2024 10:38
@xvello
Copy link
Contributor Author

xvello commented Feb 21, 2024

If we could also get an update to the docs, that would be greatly appreciated 🙏

Done: atuinsh/docs#37

ellie pushed a commit to atuinsh/docs that referenced this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Command to retro-actively apply history_filter on history
2 participants