Skip to content

Instantly share code, notes, and snippets.

@stephencelis
Created March 2, 2009 15:00

Revisions

  1. stephencelis created this gist Mar 2, 2009.
    10 changes: 10 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # ~/.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