Skip to content

Instantly share code, notes, and snippets.

@stephencelis
Created March 2, 2009 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save stephencelis/72782 to your computer and use it in GitHub Desktop.
Save stephencelis/72782 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