0

In my workspace settings I have

{
  "terminal.integrated.shellArgs.linux": [
    "-c",
    "yarn custom_shell"
  ],
}

which launches a custom shell that prompts for user input on startup.

When I create a launch.json config that launches using the integrated terminal my yarn custom_shell command will run and wait for input, causing the launch command supplied by VS Code to fail to run. This same issue occurs for extensions that launch a program in my integrated terminal.

Is there a way to launch the integrated terminal with terminal.integrated.shellArgs only when it is an interactive user shell, not a shell started by an extension or launch.json config?

sabrehagen
  • 1,517
  • 1
  • 13
  • 38

1 Answers1

0

I think a good solution is to keep the integrated shell to behave as expected and to use shell-launcher extension for hacking different shells in vscode (it might also save you the need to wait for user input in your custom shell):

  "shellLauncher.shells.linux": [
      {
          "shell": "bash",
          "args": ["-c yarn custom_shell"],
          "label": "my_custom_yarn_shell"
      }
  ]
idanp
  • 973
  • 12
  • 18
  • This is a nice solution for this case. I'll wait to see if there is a native solution posted before accepting your answer. – sabrehagen Dec 06 '18 at 02:51