-
-
Save 343max/345160cf1a1367bcb7545130cd200613 to your computer and use it in GitHub Desktop.
for all those people who use VSCode Insiders normally to switch very quickly to the stable version when needed just by launching VSCode stable
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
#!/usr/bin/env bash | |
# use VSCode Insiders by default, but not if VSCode Stable is already running | |
# [V] is neccessary so grep doesn't find itself... | |
VS_IS_RUNNING=$(ps -A | grep "/[V]isual Studio Code.app/Contents/MacOS/Electron" | wc -l) | |
if [ $VS_IS_RUNNING -ne 0 ]; then | |
/usr/local/bin/code "$@" | |
else | |
/usr/local/bin/code-insiders "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment