Custom Terminal Profile Manager
Create custom VS Code terminal profiles with configurable shells, arguments, and startup commands.
Features
- Custom terminal profiles with configurable executables and arguments
- Profile and workspace-specific startup commands
- Startup command expansion as text or Base64
Configuration
Profiles are defined in the extension configuration under customTerminalProfiles in package.json:
"customTerminalProfiles": {
"my-profile": {
"name": "My Terminal",
"icon": "terminal",
"executable": "C:\\Windows\\System32\\cmd.exe",
"separator": " & ",
"arguments": [
"/K",
"${startup.text}"
],
"startup": [
"echo Profile startup command 1",
"echo Profile startup command 2"
]
}
}
Supported properties:
name — Terminal profile name.
icon — VS Code codicon.
executable — Shell executable.
separator — Separator used to combine startup commands.
arguments — Arguments passed to the executable.
startup — Profile startup commands; pass in arguments using ${startup.text} or ${startup.base64}.
Register Profile
Register the profile in contributes.terminal.profiles:
"contributes": {
"terminal": {
"profiles": [
{
"id": "customTerminalProfiles.my-profile",
"title": "My Profile"
}
]
}
}
The id must use the corresponding profile ID customTerminalProfiles.my-profile.
Workspace Setup
Add user- or workspace-specific startup commands in settings.json:
"customTerminalProfiles.startup": {
"my-profile": {
"commands": [
"echo Workspace startup command 1",
"echo Workspace startup command 2"
]
}
}
Profile and workspace startup commands are combined when the profile starts.