Shell Styling Breaks Bash Tool Parsing and Functionality
Resolved 💬 3 comments Opened Jul 18, 2025 by meirpro Closed Jul 19, 2025
Bug Description
if the user opens a shell with styling and bash_prompt injects the colors and other chars, it messes with the bash tool
Environment Info
- Platform: darwin
- Version: 1.0.55
- Feedback ID: 560407b3-099b-4e85-a084-f3051b0991cc
Errors
Bash(<any command>)
⎿ Error: /dev/fd/63: line 1: syntax error near unexpected token $'B\E[m#''# Snapshot file'
/dev/fd/63: line 1:
---
after debugging, I realized it started only after I opened a new shell window with some non default styling.
and found that if you have the following in your ~/.bash_profile:
for file in ~/.{path,exports,bash_prompt,aliases,functions,extra}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
you should change it it to:
for file in ~/.{path,exports,aliases,functions,extra}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
# Only load bash_prompt in interactive shells
if [[ $- == *i* ]]; then
[ -r ~/.bash_prompt ] && source ~/.bash_prompt;
fi;This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗