- macOS, Linux badge and AI suggestions showcase in README - Update user guide and docs for development
918 B
918 B
Shell history integration (integration/history.go)
The history module provides Ctrl+R search functionality by reading the user's persistent shell command history.
Features
- Zsh extended support: Parses
: <timestamp>;<command>format common in Zsh. - Lazy loading: Reads disk only when history search is invoked, preserving instant startup performance.
- Fuzzy search: Integrates with the
fuzzysearch engine for match scoring. - Deduplication: Filters duplicate commands, displaying unique entries.
Data flow
- User presses
Ctrl+R. rootsetsmode = "history".SearchHistory("")is called.- If cache is empty:
- Reads history file (
~/.zsh_historyor~/.bash_history). - Strips metadata using delimiters.
- Populates command memory cache.
- Reads history file (
- Matches are scored and sorted by the search engine.
- Suggestions are returned to
overlayfor rendering.