Cursor Terminal Shell Configuration Bug Investigation
Initial Environment Check
$SHELL
shows/bin/zsh
- Actual running process shows
/bin/bash
- Terminal is launched by “Cursor Helper: terminal pty-host”
Configuration Attempts
1. Workspace Settings (.vscode/settings.json
)
{
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "/bin/zsh",
"args": ["-l"],
"overrideName": true
}
}
}
2. Cursor Global Settings (~/Library/Application Support/Cursor/User/settings.json
)
{
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "/bin/zsh",
"args": ["-l"],
"overrideName": true
}
}
}
3. VS Code Global Settings (~/Library/Application Support/Code/User/settings.json
)
- Added the same terminal configuration
- Noted existing setting
"terminal.integrated.inheritEnv": false
Environment Variables Check
SHELL=/bin/zsh
RBENV_SHELL=zsh
TERM_PROGRAM=vscode
TERM=xterm-256color
- Various Cursor/VS Code specific variables present
Process Hierarchy
- Terminal process → Cursor Helper: terminal pty-host → Cursor.app
Results
- After each configuration change and restart, the terminal still defaults to bash
- Environment variables correctly indicate zsh
- The issue persists regardless of configuration location (workspace, Cursor global, or VS Code global)
Current Workaround
- Prepending commands with
/bin/zsh -il -c
to force zsh execution
This appears to be a bug in Cursor’s terminal implementation where it’s not properly respecting the shell configuration settings, despite the environment variables being correctly set for zsh.