dotfiles/gemdoc

11 lines
324 B
Plaintext
Raw Normal View History

2009-03-20 00:08:06 +11:00
# Gem Doc
export GEMDIR=`/usr/bin/gem env gemdir`
2009-03-20 00:08:06 +11:00
gemdoc() {
open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html
}
_gemdocomplete() {
COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]}))
return 0
}
complete -o default -o nospace -F _gemdocomplete gemdoc