Skip to content

Instantly share code, notes, and snippets.

@mbejda
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbejda/d2cdc698e395ab284736 to your computer and use it in GitHub Desktop.
Save mbejda/d2cdc698e395ab284736 to your computer and use it in GitHub Desktop.
Simple StackOverFlow Search CLI
sof()
{
#relevance newest votes active
if [ "$1" == "" ]; then
echo "question is missing"
return 1;
fi
if [ "$2" != "" ]; then
echo \$2 is set;
tab=$2;
else
tab='relevance';
fi
open "http://stackoverflow.com/search?tab=$tab&q=$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment