Skip to content

Instantly share code, notes, and snippets.

@rauhryan
Created April 29, 2012 18:35
Show Gist options
  • Save rauhryan/2552508 to your computer and use it in GitHub Desktop.
Save rauhryan/2552508 to your computer and use it in GitHub Desktop.
bash function to open sln files in windows
# Add this to your ~/.bashrc
function sln() {
if [ $(find . -type f -name "*.sln" | wc -l) == 1 ]; then
start $(find . -type f -name "*.sln")
else
select x in $(find . -type f -name "*.sln")
do
start $x
break
done
fi
}
export -f sln
#!/usr/bin/env bash
# Save this file in your bin as sln and chmod +x
if [ $(find . -type f -name "*.sln" | wc -l) == 1 ]; then
start $(find . -type f -name "*.sln")
else
select x in $(find . -type f -name "*.sln")
do
start $x
break
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment