Created
August 30, 2022 12:10
-
-
Save michidk/2a320c17034d34a66c1455e903c0f47f to your computer and use it in GitHub Desktop.
vscode devcontainer utility script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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