microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
158.92k stars 27.79k forks source link

Add support for terminal profile selection based on glob patterns #212052

Open poa00 opened 1 week ago

poa00 commented 1 week ago

The glob pattern support for the "files.associations" setting in VS Code has proven incredibly useful.

I wonder if something similar could be implemented for users who tend to use multiple integrated terminal profiles (depending on workspace / project) where the default terminal could easily be defined for a directory organized as follows:

projects/
│
├── cpp/
│   ├── <cpp project 1>
│   └── <cpp project 2>
│  
├── csharp/
│   ├── <c# project 1>
│   └── <c# project 2>
│
├── bash/
│   ├── <sh project 1>
│   └── <sh project 2>
│  
└── and so on...

by simply using glob patterns to define associations like so: [^1]

"integrated.terminal.associations": {
  "**/cpp/**": "msys2",
  "**/csharp/**": "cmd",
  "**/bash/**": "GitBash",

[^1]: Just an illustration - identifiers may not be accurate

VSCodeTriageBot commented 1 week ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!