Expand description
shellhist-core — readers for shell command-history files.
Parses the four common history formats into a uniform HistoryEntry stream:
bash (.bash_history), zsh (.zsh_history, including EXTENDED_HISTORY),
PowerShell PSReadLine (ConsoleHost_history.txt), and fish (fish_history).
The input is attacker-controllable evidence: parsing is lenient (lossy UTF-8),
bounds-checked, and never panics. No unsafe. Findings live in the sibling
shellhist-forensic crate; this crate only decodes.
Modules§
- bash
- Bash history (
.bash_history). - fish
- Fish history (
fish_history). - powershell
- PowerShell PSReadLine history (
ConsoleHost_history.txt). - zsh
- Zsh history (
.zsh_history).
Structs§
- History
Entry - One command-history entry, normalized across shells.
Enums§
- Shell
- The shell a history file was produced by.
Functions§
- detect
- Detect the history format from the bytes and an optional filename hint.
- parse
- Parse history bytes as the given shell.
- parse_
auto - Detect the format, then parse. The zero-knowledge entry point.
- strip_
bom - Strip a leading UTF-8 BOM (
EF BB BF) if present.