Expand description
Shell history analysis. Parses shell history files (bash, zsh, fish), counts commands, and ranks them by frequency.
let ranked = shellist::analyze("ls\ngit\nls\ncd\ngit\nls");
assert_eq!(ranked, vec![
("ls".to_string(), 3),
("git".to_string(), 2),
("cd".to_string(), 1),
]);Re-exports§
pub use aggregators::count_commands;pub use aggregators::count_commands_at_depth;pub use aggregators::filter_by_min_frequency;pub use aggregators::filter_commands;pub use aggregators::rank_commands;pub use aggregators::rank_commands_ascending;pub use aggregators::top_n;pub use completions::completions;pub use date::Bucket;pub use date::bucket_key;pub use date::civil_from_days;pub use date::days_from_civil;pub use date::parse_date_to_unix;pub use io::default_history_path;pub use io::load_history_file;pub use man::man_page;pub use models::HistoryEntry;pub use output::Stats;pub use output::TableOptions;pub use output::compute_stats;pub use output::compute_trend;pub use output::format_csv;pub use output::format_json;pub use output::format_stats;pub use output::format_table;pub use output::format_trend;pub use parsers::DefaultHistoryParser;pub use parsers::FishHistoryParser;pub use parsers::HistoryParser;pub use parsers::ZshHistoryParser;pub use parsers::parse_history;pub use search::grep_filter;pub use shell::Shell;pub use shell::detect_shell;
Modules§
- aggregators
- Command aggregation: counting, ranking, and filtering.
- completions
- Shell completion script generation (bash, zsh, fish).
- date
- Date math and parsing with zero dependencies.
- io
- File I/O for loading history files from disk.
- man
- Man page (groff/troff) generation.
- models
- Domain types for shell history entries.
- output
- Output formatting: tables, JSON, CSV, stats, and trend charts.
- parsers
- Parsers turn raw history text into structured entries.
- search
- Search / regex filtering over ranked commands.
- shell
- Shell detection and per-shell history paths.
Functions§
- analyze
- Full pipeline: raw history text in, ranked commands out.
- parse_
with_ detected - Detect shell format and parse with the appropriate parser.
Type Aliases§
- Bash
History Parser - Alias for
DefaultHistoryParserfor naming consistency withZshHistoryParser/FishHistoryParser.