Easy-access rdocs
Shorten your access time to gem rdocs with this shell script.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Shorten your access time to gem rdocs with this shell script.
Comments
I needed to add a / to line 3 to become:
open $gemdir/doc/`ls $gemdir/doc/ | grep $1 | sort | tail -1`/rdoc/index.htmlThe extra slash is before “rdoc/index.html”
This looks awesome, but I’m getting:
Couldnt get a file descriptor referring to the console Could not get a file descriptor referring to the consolewhen I try to run it. I’m on Ubuntu 7.10, btw.Dr. Nic: Thanks, I’ve fixed it. My bash profile also has
alias ls="ls -FG", which adds a trailing slash to directories, so this one slipped under the radar.openBack: Are you using bash as your shell? What’s the output of
$ echo $SHELL?stephencelis: yes, it’s bash
echo $SHELL /bin/bashFor those who have made the switch to the fantastic Fish shell this functionality is one of many nuggets contained in the Fish nuggets project at Gitorious.
Along with Capistrano + git + Rake completions, of course.
openBack: it hit me!
openis a shortcut on OS X to bring up your web browser. Just substituteopenwith whatever command you use to open your browser.There’s also gemdocs.
Post a comment