Skip to content

fix: detect Windows shell profiles with absolute paths and support default profile selection#502

Merged
j4rviscmd merged 2 commits into
mainfrom
fix/terminal-profile-fix
May 10, 2026
Merged

fix: detect Windows shell profiles with absolute paths and support default profile selection#502
j4rviscmd merged 2 commits into
mainfrom
fix/terminal-profile-fix

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Shell profile detection on Windows used bare executable names (e.g., "powershell.exe") which prevented shell candidate suggestions from appearing in terminal.integrated.defaultProfile.windows settings
  • Switched to absolute paths covering Windows PowerShell, pwsh (MSI/Store/Scoop), Git Bash, cmd, and WSL
  • Fixed case-insensitive path comparison for default shell detection on Windows (ComSpec may return C:\WINDOWS\... while candidates use %windir%\System32\...)
  • Merged config profiles with detected profiles in getProfiles() so that getDefaultProfile() correctly finds user-configured defaults (it filters !e.isAutoDetected)
  • Added profile icons via getProfileIcon() mapping shell names to Codicon terminal icons

Test plan

  • Open Settings > Terminal > terminal.integrated.defaultProfile.windows — verify suggestion list shows detected shells
  • Select "Git Bash" as default, open a new terminal — verify Git Bash launches with --login -i
  • Select "PowerShell" (pwsh 7 from Store), open a new terminal — verify pwsh launches
  • Select "Windows PowerShell", open a new terminal — verify Windows PowerShell 5.1 launches
  • Select "Command Prompt", open a new terminal — verify cmd.exe launches
  • Verify isDefault is correctly set for ComSpec shell (cmd.exe) on Windows

🤖 Generated with Claude Code

…fault profile selection

Shell profile detection used bare executable names on Windows which
prevented suggestions from appearing in terminal settings. Switched
to absolute paths covering PowerShell, pwsh (MSI/Store/Scoop), Git Bash,
cmd, and WSL. Added case-insensitive path comparison for Windows default
shell detection. Merged config profiles with detected profiles so that
getDefaultProfile() correctly finds user-configured defaults.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@j4rviscmd j4rviscmd added bug Something isn't working windows labels May 10, 2026
- Use strict !== for null check (eqeqeq rule)
- Replace 'in' operator with hasOwnProperty (code-no-in-operator rule)

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@j4rviscmd j4rviscmd merged commit eddffe5 into main May 10, 2026
7 checks passed
@j4rviscmd j4rviscmd deleted the fix/terminal-profile-fix branch May 10, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant