-
-
Save rauhryan/2552508 to your computer and use it in GitHub Desktop.
bash function to open sln files in windows
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 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 |
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 | |
# 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