microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 292 forks source link

How can I have a shared shell profile without having to mount in any files? #10297

Closed red8888 closed 1 month ago

red8888 commented 1 month ago

I want to have a shell profile applied with my global user config but I don't want to have to edit all my devcontainer configs to mount in a shell profile from my host nor do I want to add a shell profile script to all of my project directories.

Is there a way to define a shell profile inside vscode and have it get used for all terminals regardless of if they are dev containers or not?

For example I can do this (this actually doesn't work because of some zsh bug or something) to set shell config for all terminals without having to edit any dev container configs:

    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.integrated.profiles.linux": {
        "zsh": {
            // causes zsh bug: invalid module name `zsh/zle'
            "args": ["-o", "vi"]
        }
    },

Is there a way to store my shell profile script inside of my vscode settings? I have lots of projects and I don't want to have to configure bind mounts for every single devcontainer.json.

chrmarti commented 1 month ago

You could configure a dotfiles repository in the user settings that has the script. Image

vs-code-engineering[bot] commented 1 month ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!