Shellist
Parse .bash_history, count commands, rank by frequency. Library and CLI.
Install
CLI
Options:
| Flag | Description |
|---|---|
--top N |
Show top N commands |
--ignore X,Y |
Exclude commands (comma-separated) |
--no-default-ignore |
Don't filter bash internals (set, shopt) |
--min N |
Only commands with count ≥ N |
--path PATH |
Read from PATH (default: ~/.bash_history) |
--help |
Print help |
By default, set and shopt are ignored — these are bash internals that often leak into .bash_history from shell init scripts, not commands you actually typed. Use --no-default-ignore to see them.
Example output:
Rank Command Count
---- ------- -----
1 ls 120
2 git 95
3 cd 80
Library
use ;
// Full pipeline
let ranked = analyze;
assert_eq!;
// Step by step
let entries = parse_history;
let counts = count_commands;
let ranked = rank_commands;
let top = top_n;
let filtered = filter_commands;
// From file
let content = load_history_file?;
Benchmarks
Runs criterion benchmarks on analyze() with 100, 1k, 10k, and 100k history entries. Results
are written to target/criterion/ with HTML reports.
To compare against a baseline:
# make changes...
License
MIT