Shell — aprender-shell AI-Powered Completion
Recipes for aprender-shell v0.31.2 — lightweight shell-completion engine that trains a local .apr model from your shell history (zsh .zsh_history, bash .bash_history, fish ~/.local/share/fish/fish_history) and proposes completions inline.
Closes the ≥3 recipes per sister crate requirement from expand-cookbooks/subcrate-coverage.md.
Recipes
| # | Recipe | What |
|---|---|---|
| SH.1 | shell_history_parse_zsh | Parse synthetic ZSH extended-format history via HistoryParser; comment-line filtering |
| SH.2 | shell_corpus_from_string | Corpus::from_string with inline commands; coverage stats; empty input rejection |
| SH.3 | shell_trie_prefix_completion | Trie prefix index with frequency ranking (top-K candidates) |
API surface exercised
aprender_shell::history::HistoryParser— ZSH extended + bash + fish formatsaprender_shell::corpus::Corpus::{from_string, coverage_stats}aprender_shell::trie::Trie::{insert, find_prefix}
Provenance
Added during PMAT-081 (expand-cookbooks initiative, v6.1.0).