Skip to content

Directory Profiles Associations #212016

Open
@electriquo

Description

Although profiles have Workspace associations, a non-default profile needs to be selected. I would love to see it conditionally and automatically happening when launching code from a workspace (something in the spirit of Git conditional includes.

For instance, assume org1 and org2 profiles have been created and there are directories named org1 and org2 nested within a projects directory. When executing code . (without any arguments) within org1 directory (or within any nested directory), then code will launch with the org1 profile (equivalent for executing code --profile org1 .).

This could be easily done by wrapping code with a simple script such as

#!/usr/bin/env bash
PROFILE="Default"
! [ "$PWD" = "${PWD#${HOME}/projects/org1}" ] && PROFILE=org1
! [ "$PWD" = "${PWD#${HOME}/projects/org2}" ] && PROFILE=org2
code --profile "$PROFILE" "@$"

But it would be lovely to not wrap code and have it configured in the/a settings/file respectively.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityuser-profilesUser profile management

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions