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

Multiple WSLs & Theme #4398

Closed
ghost opened this issue Jan 29, 2020 · 6 comments
Closed

Multiple WSLs & Theme #4398

ghost opened this issue Jan 29, 2020 · 6 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered

Comments

@ghost
Copy link

ghost commented Jan 29, 2020

Environment

Windows 10 Pro 1909 18363.592

Any other software?

Steps to reproduce

Use the attached profiles.json

Expected behavior

Multiple WSLs should be in the dropdown. It works for CMD. The idea is to have different WSLs for when I need to access QA / Prod, to use the theme to differentiate where I'm logged into.

Actual behavior

Only one WSL in the dropdown. It works for CMD, although the second cmd is missing it's icon.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 29, 2020
@ghost
Copy link
Author

ghost commented Jan 29, 2020

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
  "$schema": "https://aka.ms/terminal-profiles-schema",

  "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",

  "profiles": [

    {
      "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
      "name": "cmd",
      "commandline": "cmd.exe",
      "hidden": false
    },
    {
      "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6102}",
      "name": "cmd",
      "commandline": "cmd.exe",
      "hidden": false,
      "colorScheme": "Solarized Dark"
    },
    {
      "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
      "hidden": false,
      "name": "Ubuntu",
      "source": "Windows.Terminal.Wsl",
      "colorScheme": "Solarized Light"
    },
    {
      "guid": "{2c4de342-38b7-51cf-b940-2309a097f519}",
      "hidden": false,
      "name": "Ubuntu Two",
      "source": "Windows.Terminal.Wsl",
      "colorScheme": "Solarized Dark"
    },
    {
      // Make changes here to the powershell.exe profile
      "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
      "name": "Windows PowerShell",
      "commandline": "powershell.exe",
      "hidden": false
    },
    {
      "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
      "hidden": false,
      "name": "Azure Cloud Shell",
      "source": "Windows.Terminal.Azure"
    }
  ],

  // Add custom color schemes to this array
  "schemes": [],

  // Add any keybinding overrides to this array.
  // To unbind a default keybinding, set the command to "unbound"
  "keybindings": []
}

@zadjii-msft
Copy link
Member

@DHowett-MSFT We've had this discussion before - should we put the commandline in dynamically generated profiles?

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Jan 29, 2020
@DHowett-MSFT
Copy link
Contributor

If we put the commandline in, it'll be subject to the same rules that we run afoul of with the name in #4273. We could put it in a comment ... but it would not be easily discovered

@ghost
Copy link
Author

ghost commented Jan 30, 2020

Found out I can change bashrc so I can set QA servers to have a specific color prompt and Prod servers another, which basically solves what I was trying to achieve :)

@DHowett-MSFT
Copy link
Contributor

Fair enough. Thanks for following up!

@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 31, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 31, 2020
@inoue-katsumi
Copy link

I think the workaround is to replace "source": "Windows.Terminal.Wsl", line with "commandline": "wsl.exe -d Ubuntu-18.04", .
I put a sample at https://github.com/inoue-katsumi/WSL/blob/master/profiles.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants