24 June, 2023

VSCode: shell panes next to your startup tasks

Okay, this one is pretty niche, but I'm a big fan of having VSCode automatically launch tasks when I open a project. However, one thing that always bothered me was that these task panes would open in a new tab, hiding the default shell under a different tab.

My solution: adding a task to open a shell in the same tab group to tasks.json.

// .. other tasks ...
{
  "type": "process",
  "label": "shell",
  "command": "/bin/zsh", // or your shell of choice
  "args": ["-l"], // login shell
  "problemMatcher": [],
  "presentation": {
    "echo": false,
    "focus": true,
    "group": "startup", // make sure this is the same group as your other tasks
    "panel": "dedicated"
  },
  "runOptions": {
    "runOn": "folderOpen" // automatically run when you open the project in VSCode
  }
}
// .. other tasks ...