Summary
The cx fix command expects errors to be in ~/.cx/last_error, but there is no shell integration to automatically capture command errors.
Current Behavior
$ some-command-that-fails
error: something went wrong
$ cx fix
# Error: No error captured. Run a command first or use: cx fix "error message"
Required Shell Integration
Bash (~/.cx/shell/bash_integration.sh)
- Capture stderr from last command
- Write to ~/.cx/last_error on non-zero exit
- Hook into PROMPT_COMMAND
Zsh (~/.cx/shell/zsh_integration.sh)
- Similar implementation using precmd hook
- Compatible with oh-my-zsh and powerlevel10k
Installation
cx setup shell # Adds source line to ~/.bashrc or ~/.zshrc
Acceptance Criteria
Summary
The
cx fixcommand expects errors to be in~/.cx/last_error, but there is no shell integration to automatically capture command errors.Current Behavior
$ some-command-that-fails error: something went wrong $ cx fix # Error: No error captured. Run a command first or use: cx fix "error message"Required Shell Integration
Bash (~/.cx/shell/bash_integration.sh)
Zsh (~/.cx/shell/zsh_integration.sh)
Installation
cx setup shell # Adds source line to ~/.bashrc or ~/.zshrcAcceptance Criteria
cx setup shellinstalls integrationcx fixreads captured error automatically