Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #302 handling of Windows terminals determined by profiles #303

Merged
merged 1 commit into from
Mar 19, 2022

Conversation

kagof
Copy link
Contributor

@kagof kagof commented Oct 10, 2021

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 (using path).

Also note that the deprecated terminal.integrated.shell.${os} definition currently overrides the new terminal.integrated.defaultProfile.${os}.

With that being said, I've tested this new code with:

  • MacOS

    • terminal set as zsh (just ensuring that non-Windows usage is not broken by this change)
  • Windows:

    • shell set to PowerShell executable ("terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe")
    • shell set to Git Bash executable ("terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe")
    • default profile set to the default PowerShell profile ("terminal.integrated.defaultProfile.windows": "PowerShell")
    • default profile set to the default Git Bash profile ("terminal.integrated.defaultProfile.windows": "Git Bash")
    • default profile set to a custom profile using the PowerShell profile ("terminal.integrated.defaultProfile.windows": "foo")
    • default profile set to a custom profile using the Git Bash profile ("terminal.integrated.defaultProfile.windows": "bar")
    • default profile set to a custom profile using PowerShell executable ("terminal.integrated.defaultProfile.windows": "baz")
    • default profile set to a custom profile using Git Bash executable ("terminal.integrated.defaultProfile.windows": "bif")
    • default profile & shell properties all not set (defaults to PowerShell)

    Where:

      "terminal.integrated.profiles.windows": {
          "foo": {
              "source": "PowerShell"
          },
          "bar": {
              "source": "Git Bash"
          },
          "baz": {
              "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
          },
          "bif": {
              "path": "C:\\Program Files\\Git\\bin\\bash.exe"
          }
      }

@akien-mga akien-mga merged commit 62cb49e into godotengine:master Mar 19, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants