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

#RecipeWhat
SH.1shell_history_parse_zshParse synthetic ZSH extended-format history via HistoryParser; comment-line filtering
SH.2shell_corpus_from_stringCorpus::from_string with inline commands; coverage stats; empty input rejection
SH.3shell_trie_prefix_completionTrie prefix index with frequency ranking (top-K candidates)

API surface exercised

  • aprender_shell::history::HistoryParser — ZSH extended + bash + fish formats
  • aprender_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).