Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory Profiles Associations #212016

Open
electriquo opened this issue May 4, 2024 · 0 comments
Open

Directory Profiles Associations #212016

electriquo opened this issue May 4, 2024 · 0 comments
Assignees
Labels
feature-request Request for new features or functionality user-profiles User profile management
Milestone

Comments

@electriquo
Copy link

electriquo commented May 4, 2024

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.

@alexr00 alexr00 assigned sandy081 and unassigned alexr00 May 6, 2024
@sandy081 sandy081 added feature-request Request for new features or functionality user-profiles User profile management labels May 6, 2024
@sandy081 sandy081 added this to the Backlog milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality user-profiles User profile management
Projects
None yet
Development

No branches or pull requests

4 participants