Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timriley/74757 to your computer and use it in GitHub Desktop.
Save timriley/74757 to your computer and use it in GitHub Desktop.
function sc {
if [ -x script/console ]; then
script/console
else
sinatra_rb=`egrep -l "^require.+sinatra.$" *.rb 2>/dev/null`
if [ -e $sinatra_rb ]; then
irb -r $sinatra_rb
else
irb
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment