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

Will there be a devcontainer open command? #30

Open
metaskills opened this issue May 22, 2022 · 4 comments
Open

Will there be a devcontainer open command? #30

metaskills opened this issue May 22, 2022 · 4 comments
Labels
feature-request New feature or request under-discussion Issue is under discussion for relevance, priority, approach

Comments

@metaskills
Copy link

I was getting kind of tired of opening a new VS Code window and using the "Remote-Containers: Open Folder in Container..." command and was wondering if there was an easy way to do the same via the CLI. Eventually I stumbled on this thread which I've participated on as well.

microsoft/vscode-remote-release#2133 (comment)

Not sure if this project would have a simple open command or not or where that would land?

@chrmarti
Copy link
Contributor

We want to keep this new CLI independent of VS Code, so an open command would need a way for all editors to participate. Maybe an EDITOR_DEVCONTAINER env variable could be used similarly to the commonly used EDITOR env variable, but I'm not sure having an open command just to invoke EDITOR_DEVCONTAINER would then add much value.

@chrmarti chrmarti added feature-request New feature or request under-discussion Issue is under discussion for relevance, priority, approach labels May 23, 2022
@metaskills
Copy link
Author

That seems to make sense... when I looked at other proposed solutions to make VS Code & the CLI easier I got the impression that the image IDs might not match what VS Code's "Open Folder in Container..." would do. Do you think that is un-warranted? I have not confirmed if it was the case or not.

Also, did y'all have thoughts on where devcontainer open should land? Maybe some VS Code CLI?

@felipecrs
Copy link

I think an open command in the @devcontainers/cli could provide support for many editors, like vscode or intellij. The preferred editor could be configured by the user in some kind of configuration file (as we do for git in the ~/.gitconfig).

Initially, it could support vscode only. More editors could be added over time. Or even an generic implementation could also be added so that any editor can plug-in without having to be supported by @devcontainers/cli before.

@CodeMan99
Copy link
Contributor

CodeMan99 commented Feb 6, 2023

There's several hacks using code --folder-uri to make your own open command. For example, see my bash function implementation.

This definitely should have better support. Until I found that hack, I stayed on the version provided by the vscode-remote extension, which is rather buggy to say the least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants