Skip to content

Instantly share code, notes, and snippets.

@michidk
Created August 30, 2022 12:10
Show Gist options
  • Save michidk/2a320c17034d34a66c1455e903c0f47f to your computer and use it in GitHub Desktop.
Save michidk/2a320c17034d34a66c1455e903c0f47f to your computer and use it in GitHub Desktop.
vscode devcontainer utility script
# utiliy for opening devcontainers
vs() {
if [ -z "$1" ]; then
if [ -d ".devcontainer" ]; then
echo "Found devcontainer"
devcontainer open .
else
echo "No devcontainer found"
code .
fi
else
if [ -d "$1/.devcontainer" ]; then
echo "Found devcontainer in folder"
devcontainer open $1
else
echo "No devcontainer found in folder"
code $1
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment