Ruby on Rails developers spend a lot of time in console.
function api() { google-chrome "http://apidock.com/$1/search?query=$2" ;}added to your .bashrc file will allow you to search Ruby/Ruby on Rails/Rspec documentation on APIDock directly from the console.
Usage:
api [ruby|rails|rspec] method_nameExample:
api rails link_toA better way is to search by default in rails and specify ruby|rspec only if needed.
function apidock() { if [ $1 = 'ruby' ] || [ $1 = 'rspec' ]; then open "http://apidock.com/$1/search?query=$2" ; else open "http://apidock.com/rails/search?query=$1"; fi }
A better way is to search by default...rails and specify ruby|rspec only if needed.