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

Enable multiple command stats to be shown #1054

Closed
wants to merge 2 commits into from

Conversation

Shirtpantswallet
Copy link
Contributor

These changes extend the stats subcommand with an --ngram-size argument, which supports providing statistics for combinations of commands. I have found this useful for identifying the most common combinations of commands as candidates for further automation.

Add improved pipe splitting

Clean up split logic

Remove unnecessary lifetime annotations

Add per-column command padding
@vercel
Copy link

vercel bot commented Jun 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atuin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 8:00am
atuin-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 8:00am

@ellie
Copy link
Member

ellie commented Sep 19, 2023

Hey! Thank you for working on this 🙏

Generally looks good, though I found an issue with unicode.

chars doesn't handle unicode characters so well, as per the docs:

It’s important to remember that char represents a Unicode Scalar Value, and might not match your idea of what a ‘character’ is. Iteration over grapheme clusters may be what you actually want. This functionality is not provided by Rust’s standard library, check crates.io instead.

As mentioned there, we will probably need to use something like unicode_segmentation instead.

I hope you don't mind me pushing to your branch, but I've added a failing test case to highlight the issue

drbrain added a commit to drbrain/atuin that referenced this pull request Feb 20, 2024
@ellie ellie closed this in #1739 Feb 26, 2024
ellie added a commit that referenced this pull request Feb 26, 2024
…egmentation (#1739)

* Enable multiple command stats to be shown

Add improved pipe splitting

Clean up split logic

Remove unnecessary lifetime annotations

Add per-column command padding

* Add failing test case

* Update #1054 to use unicode_segmentation

This addresses feedback in PR #1054

Closes #1054

* Address cargo clippy, fmt

---------

Co-authored-by: Sorenson Stallings <contact@sorenson.dev>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
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.

None yet

2 participants