Skip to content

Instantly share code, notes, and snippets.

@ThatRendle
Created June 20, 2012 14:49
Show Gist options
  • Save ThatRendle/2960254 to your computer and use it in GitHub Desktop.
Save ThatRendle/2960254 to your computer and use it in GitHub Desktop.
Shell script to launch Visual Studio with either named sln or most recently modified
if [ -n "$1" ]; then
file=$1
else
file=( $(ls -xt *.sln | head -n1))
fi
if [ -z "$file" ]; then
echo "No solution found."
exit 1
fi
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 11.0/Common7/IDE/devenv.exe "$file" &
@ThatRendle
Copy link
Author

Also, add:

alias vs=[put path here]/vs.sh

to your ~/.bashrc for convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment