Shell Differences
Lacy supports both ZSH and Bash 4+, but ZSH gets a richer feature set due to the ZLE (Zsh Line Editor) API. Here's the full matrix.
Feature matrix
| Feature | ZSH | Bash 4+ |
|---|---|---|
| Auto routing (shell vs agent) | ✓ | ✓ |
| Mode switching (Ctrl+Space) | ✓ | ✓ (via macro) |
| Real-time indicator (colors as you type) | ✓ | — |
| First-word syntax highlighting | ✓ | — |
| Ghost text suggestions after reroute | ✓ | — |
| Right-prompt mode badge (RPS1) | ✓ | — |
| PS1 mode badge | — | ✓ |
| Terminal context injection | ✓ | ✓ |
| Post-execution reroute (Layer 2) | ✓ | ✓ |
| Session management (/new, /resume) | ✓ | ✓ |
| Emergency bypass (!prefix) | ✓ | ✓ |
| zsh-autosuggestions coexistence | ✓ | N/A |
Bash adapter notes
Enter key
Can't use bind -x directly on \C-m — it replaces accept-line entirely. Instead, Lacy binds classification to a hidden key (\C-x\C-l) and makes \C-m a macro: "\C-x\C-l\C-j" (classify, then accept-line).
Spinner in Bash
Background { ... } & jobs dump their source on exit via bash's[N] Done ... notification. Fix: disown the PID immediately after starting.
No real-time indicator
Bash has no zle-line-pre-redraw equivalent. The PS1 badge updates only after each command runs.
Ctrl+Space in Bash
Uses macro "\C-a\C-k _lacy_mode_toggle_\C-j" — types a hidden command and submits, so PROMPT_COMMAND can update PS1.
macOS Bash version
macOS ships with Bash 3.2 (GPL2 license). Lacy requires Bash 4+. Install a modern version: brew install bash, then add /opt/homebrew/bin/bash to/etc/shells and run chsh -s /opt/homebrew/bin/bash.