Created
August 4, 2022 16:06
-
-
Save IMalaniak/82330294857ff49785d92227bbfa0e28 to your computer and use it in GitHub Desktop.
Alias for opening a VS Code workspace in the current folder
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
# add this script to your `.zshrc` | |
vspace() { | |
vsworkfolder=$(find . -maxdepth 1 -type f -name '*.code-workspace') | |
if [ -z "$vsworkfolder" ]; then | |
echo "No workspace found" | |
else | |
code "$vsworkfolder" | |
fi | |
} | |
# Usage: | |
# `cd` to the directory with VS Code workspace you want work in | |
# vspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment