Created
October 7, 2020 17:50
-
-
Save kopiro/08b552fa1ad459804132ff1b82e42b59 to your computer and use it in GitHub Desktop.
Sync your ~/Projects directories with VSCode Project Manager extension
This file contains hidden or 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
sync-code-projects() { | |
CODE_PROJECTS_FILE="$HOME/Library/Application Support/Code/User/projects.json" && \ | |
echo "[" > "$CODE_PROJECTS_FILE" && \ | |
find ~/Projects \ | |
-maxdepth 1 \ | |
-type d \ | |
-execdir echo "{ \"name\": \"{}\", \"rootPath\": \"$HOME/Projects/{}\", \"enabled\": true }," >> "$CODE_PROJECTS_FILE" \; && | |
echo "{}]" >> "$CODE_PROJECTS_FILE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment