[Bug]: atuin stats better history
Jiehong opened this issue · 3 comments
What did you expect to happen?
Hello!
First, this is more of an improvement, than a bug report.
Today, when running atuin stats
, which shows the top 10 commands, in my case:
$ atuin stats
[▮▮▮▮▮▮▮▮▮▮] 1481 bash
[▮▮▮▮▮ ] 823 ruff
[▮▮▮▮▮ ] 767 just
[▮▮▮▮ ] 622 mvn
[▮▮▮ ] 557 make
[▮▮▮ ] 521 rg
[▮▮▮ ] 501 podman compose
[▮▮ ] 413 duckdb
[▮▮ ] 379 brew
[▮▮ ] 373 python
Total commands: 14731
Unique commands: 5422
Which is great, but I know I tend to run bash xxx
, and I want to find out what are common sub commands in those sections.
atuin stats
has the following argument:
-n, --ngram-size <NGRAM_SIZE> The number of consecutive commands to consider [default: 1]
But this only looks for commands with pipes, and this does not show me what I want.
I have a workaround:
$ atuin history list --format '{command}' | sort | uniq -c | sort -nr | head -10
But it would be nice if I could run something like this with atuin stats --full-command
directly.
What happened?
No error.
Atuin doctor output
Not required.
Code of Conduct
- I agree to follow this project's Code of Conduct
You're probably looking for this: https://docs.atuin.sh/configuration/config/#common_subcommands
@ellie That's one (static) way, but perhaps we could have a 'drill-down' mode on the stats if it's interactive: ctrl-o
to inspect the entry for more details.
may we re-open this issue?