Skip to content

Instantly share code, notes, and snippets.

@chorn
Created February 10, 2010 14:54
Show Gist options
  • Save chorn/300389 to your computer and use it in GitHub Desktop.
Save chorn/300389 to your computer and use it in GitHub Desktop.
## gemdoc
if ( which "gem" >/dev/null ) ; then
gemdoc() {
for e in lynx w3m elinks links /usr/bin/open ; do
if ( which $e >/dev/null ) ; then
HTML_OPEN="${e}"
fi
done
$HTML_OPEN `/bin/ls -1t $(gem env gemdir)/doc/$1*/rdoc/index.html | grep "\/$1\-[0-9]" |head -1`
}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment