Created
October 14, 2009 16:40
-
-
Save porras/210208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export GEMDIR=`gem env gemdir` | |
| gemdoc() { | |
| open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html | |
| } | |
| mategem() { | |
| mate $GEMDIR/gems/`$(which ls) $GEMDIR/gems | grep $1 | sort | tail -1` | |
| } | |
| _gemdocomplete() { | |
| COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]})) | |
| return 0 | |
| } | |
| complete -o default -o nospace -F _gemdocomplete gemdoc | |
| complete -o default -o nospace -F _gemdocomplete mategem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment