Skip to content

Instantly share code, notes, and snippets.

@shanlalit
Forked from stephencelis/gist:72782
Created March 6, 2009 20:52
Show Gist options
  • Save shanlalit/75067 to your computer and use it in GitHub Desktop.
Save shanlalit/75067 to your computer and use it in GitHub Desktop.
# ~/.bash_profile
export GEMDIR=`gem env gemdir`
gemdoc() {
local gems=($GEMDIR/doc/$1*/rdoc/index.html)
open ${gems[@]: -1}
}
complete -W '$(`which ls` $GEMDIR/doc)' gemdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment