Expand description
Shell history utilities (persistence and search).
Default path: ~/.config/modcli/history (Unix/macOS)
These helpers are optional and can be used by applications embedding mod-cli.
Functions§
- add
- Append a single entry to history, creating files/dirs if necessary.
- default_
history_ path - Resolve a default history path (best-effort, cross-platform fallback).
- load
- Load history lines from a file, ignoring IO errors (returns empty on failure).
- save
- Save all history lines to the target file, creating directories if needed.
- search
- Simple case-insensitive substring search returning up to
limitmatches (most recent last).