atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Enable multiple command stats to be shown

Open Shirtpantswallet opened this issue 1 year ago • 2 comments

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.

Shirtpantswallet avatar Jun 15 '23 13:06 Shirtpantswallet

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

vercel[bot] avatar Jun 15 '23 13:06 vercel[bot]

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

ellie avatar Sep 19 '23 07:09 ellie