Shell snapshot generation duplicates alias '--' causing 'alias: --: not found' error
Resolved 💬 3 comments Opened Sep 25, 2025 by meirpro Closed Sep 29, 2025
Bug Report
Description:
Claude Code shell snapshots incorrectly duplicate the '--' delimiter in alias commands, causing bash errors.
Steps to reproduce:
- Have an alias in shell config like:
alias -- -='cd -' - Run any Claude Code command
- Error appears:
alias: --: not found
Expected behavior:
Alias should be preserved as: alias -- -='cd -'
Actual behavior:
Claude generates: alias -- -- -='cd -' (note the duplicate --)
Environment:
- macOS
- Bash shell
- Alias defined in ~/.aliases file
Workaround:
Comment out the problematic alias or use alternative syntax.
Files affected:
Shell snapshot files like: /Users/lightwing/.claude/shell-snapshots/snapshot-bash-*.sh
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗