shellist 0.1.0

Shell history analysis. Parses .bash_history, counts commands, and ranks by frequency.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Parsers turn raw history text into structured entries.

pub mod default_history_parser;

pub use default_history_parser::{DefaultHistoryParser, parse_history};

use crate::models::HistoryEntry;

/// Swappable parser trait. Implement this for zsh, fish, etc.
pub trait HistoryParser {
    /// Parse raw history text into a list of [`HistoryEntry`]s.
    fn parse(&self, input: &str) -> Vec<HistoryEntry>;
}