About
A high-performance hybrid Zsh+C autocomplete plugin with trie-based prefix matching, ghost text completion, and persistent storage. Features smart history navigation that filters commands by prefix and learns from your usage patterns.
Lightning Fast
O(log n) trie-based prefix matching with C-powered performance
Ghost Text
Smart suggestions appear as you type with dim gray styling
Prefix Filtering
Navigate only commands matching your current prefix
Persistent Storage
Commands cached between sessions for instant startup
Download
Get v1.0.0 Release
Download the complete packaged plugin with binaries and installation guide
Ready-to-use binary
Installation guide included
~14KB compressed
Interactive Demo
Type in the terminal below to see ghost text suggestions in real-time. Try typing "git" or "ls":
zsh - autocomplete demo
$
Up Arrow
Previous matching command
Right Arrow
Accept ghost suggestion
Tab
Accept ghost text
Enter
Execute command
Installation
Quick Install from Release (Recommended)
Download and extract the pre-built package with all binaries included:
wget https://github.com/sbeeredd04/zsh_plugin/releases/download/v1.0.0/zsh-autocomplete-v1.0.0.tar.gz
tar -xzf zsh-autocomplete-v1.0.0.tar.gz
cd zsh-autocomplete-v1.0.0
echo "source $(pwd)/plugin.zsh" >> ~/.zshrc
source ~/.zshrc
The package includes INSTALL.txt with complete setup instructions.
Build from Source
Step 1: Clone the repository
git clone https://github.com/sbeeredd04/zsh_plugin.git
cd zsh_plugin
Step 2: Build the system
make clean && make
Step 3: Add to your .zshrc
echo "source $(pwd)/plugin.zsh" >> ~/.zshrc
Step 4: Reload shell
source ~/.zshrc
How to Use
Basic Operations
Up Arrow:
Navigate to previous command matching prefix
Down Arrow:
Navigate to next command matching prefix
Right Arrow:
Accept ghost text completion
Enter:
Execute command and update usage statistics
Tab:
Accept ghost text or trigger standard completion
Example Workflow
$ git status # Ghost suggestion appears
# Press → to accept or continue typing
$ git status # Type "t"
# Press ↑ to see history
$ git status # From history
$ git commit -m # Press ↑ again
$ git push # Press ↑ again
# Press ↓ to navigate back
How It Works
Prefix-Based History Navigation
Type any prefix (e.g., "git") and press ↑/↓ to navigate only commands starting with that prefix. The system remembers your current position in filtered results.
Ghost Text Completion
As you type, the best matching command appears as a suggestion in dim gray. Press → (right arrow) to accept the ghost text. Suggestions are based on frequency and recency of usage.
Persistent Learning
All commands are stored in a trie structure for fast retrieval. Frequency tracking ensures better suggestions over time. Data persisted to data/trie_data.txt with no re-initialization between sessions.
Performance
0ms
Startup Time
<5ms
Ghost Text Response
<10ms
History Filtering
~1MB
Memory (1000 cmds)