Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

irbtools is a meta gem which installs some useful irb gems and configures your irb.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 screenshots
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 irbtools.gemspec
README.rdoc

irbtools

This is a meta gem which installs some useful irb gems and configures your irb.

Setup

gem install irbtools
gem install irb_rocket --source http://merbi.st
  • On Linux, you also need the xclip program: sudo apt-get install xclip

  • The irb_rocket gem might require libncurses-dev

  • On MacOS, you need growl, if you want to use the g gem.

Usage

To use it, put the following in your ~/.irbrc file (this file is loaded everytime you start an irb):

require 'rubygems' # only needed in 1.8
require 'irbtools'

If it does not exist, just create a new one.

It's possible to modify, which libraries get loaded:

require 'irbtools/configure'
# here you can modify which libraries get loaded (see below)
Irbtools.init

How to load more or less libraries

You have the following ways:

  • Irbtools.add_library(lib, in_proc = false, &block)

  • Irbtools.remove_library(lib)

  • Irbtools.add_package(pkg)

  • Irbtools.remove_package(pkg)

  • Edit the Irbtools.libraries, Irbtools.libraries_in_proc or Irbtools.packages arrays directly (no way to set callbacks).

Features

See rbjl.net/40-irbtools-release-the-power-of-irb or read the commented source file.

Included gems and libraries

  • wirble colors

  • hirb active record tables

  • fileutils cd, pwd, ln_s, mv, rm, mkdir, touch … ;)

  • zucker/env Info, OS, RubyVersion, RubyEngine

  • zucker/debug nice debug printing (q, o, c, .m, .d)

  • ap nice debug printing (ap)

  • yaml nice debug printing (y)

  • clipboard easy clipboard access (copy & paste)

  • guessmethod automatically corrects typos (method_missing hook)

  • interactive_editor lets you open vim, hack something, and it gets loaded into the current session

  • coderay some nice colorful display ;)

  • boson IRB commands repository (which also works for the shell!)

  • irb_rocket put result as comment instead of a new line!

Helper methods

See the source/rdoc for a description. These methods are defined directly by irbtools.

General: ls, cat, rq, rrq/rerequire, ls, session_history, reset!, clear, use_ruby/use, dbg, Object#ri

Clipboard: copy, paste, copy_input, copy_output

CodeRay: colorize, ray

Bugs / TODO

  • Make guessmethod 1.9 compatible

  • Fix Clipboard Windows issues

  • Fix irb_rockets general stdout problem. If something stdout related fails, odds are high that it's irb_rockets fault.

  • Pager for hirb and ri

  • Use RDoc driver instead of system ri for ri (?)

More Features

Copyright

Copyright © 2010 Jan Lelis, rbjl.net. See LICENSE for details.

J-_-L

Something went wrong with that request. Please try again.