fixes #302 handling of Windows terminals determined by profiles #303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This
escape_command
essentially cares about one thing: Is the integrated terminal using PowerShell or not.Note that VS Code has a new way of setting the integrated terminal - now they use profiles. There is a default profile for PowerShell. You can also set custom profiles, and those profiles can either be based on one of the default profiles (using
source
), or an executable (usingpath
).Also note that the deprecated
terminal.integrated.shell.${os}
definition currently overrides the newterminal.integrated.defaultProfile.${os}
.With that being said, I've tested this new code with:
MacOS
zsh
(just ensuring that non-Windows usage is not broken by this change)Windows:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
)"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
)"terminal.integrated.defaultProfile.windows": "PowerShell"
)"terminal.integrated.defaultProfile.windows": "Git Bash"
)"terminal.integrated.defaultProfile.windows": "foo"
)"terminal.integrated.defaultProfile.windows": "bar"
)"terminal.integrated.defaultProfile.windows": "baz"
)"terminal.integrated.defaultProfile.windows": "bif"
)Where: