pablotron
--
 
Wirble
Wed Sep 6 00:30:11 2006 :: Link

Wirble is a set of enhancements for Irb. Wirble enables several items mentioned on the RubyGarden "Irb Tips and Tricks" page, including tab-completion, history, and a built-in ri command, as well as colorized results and a couple other goodies. The idea, of course, is to fill Irb with useful features without turning your ~/.irbrc file into swiss cheese. Using Wirble is simple, too. Here's what a standard Wirble-enabled ~/.irbrc looks like:

begin
  # load wirble
  require 'wirble'

  # start wirble (with color)
  Wirble.init
  Wirble.colorize
rescue LoadError => err
  warn "Couldn't load Wirble: #{err}"
end

Don't like the defaults? Wirble is configurable. For documentation on enabling specific features or tweaking the color settings. take a look at the excessively-verbose Wirble README. Finally, here's a screenshot of Wirble-enabled Irb:

Wirble Screenshot
Obligatory Wirble Screenshot

Latest:
Download Wirble 0.1.3 Tarball (Signature)
Download Wirble 0.1.3 Gem (Signature)
Wirble Bug Tracker
Wirble Mercurial Repository

Older:
Download Wirble 0.1.2 Tarball (Signature)
Download Wirble 0.1.2 Gem (Signature)
Download Wirble 0.1.1 (Signature)
Download Wirble 0.1.1 Gem (Signature)
Download Wirble 0.1.0 (Signature)
Download Wirble 0.1.0 Gem (Signature)



Re: Wirble
Thu Sep 7 09:00:18 2006 :: Link :: Posted by lapomme00
This looks like a nice gem. I installed it, and placed the neccessary lines in my .irbrc file. However, upon starting irb, the features are not active. Doing irb(main):001:0> require 'rubygems' => false irb(main):002:0> require 'wirble' => true Then it works. So it's not properly loading. Any suggestions? Cheers, Brett

Re: Wirble
Wed Sep 13 03:11:26 2006 :: Link :: Posted by rtaljun
Hey there, I love your Wirble project! One problem, in the source code, Ruby 1.9 breaks when you use a ":" instead of "then" in "if", "unless", and "when" statements (probably others too). When I first installed the gem it gave me like 11 errors, but after replacing the colons in wirble.rb with "then"s or removing them outright it works perfectly.

Re: Wirble
Wed Dec 20 21:58:42 2006 :: Link :: Posted by JFSIII
Two things: First, I can't seem to get the colors to work correctly. 1) The ~/.irbrc below only changes the comma color 2) The color doesn't take effect unless I leave in "Wirble.colorize", which shouldn't be necessary, right? Second, is there any way to make this work with pretty print? Other than that, I love it. Thanks, John ## My .irbc ## # load libraries require 'rubygems' require 'wirble' wirble_opts = { # skip shortcuts :skip_shortcuts => true, # don't set the prompt :skip_prompt => true, # override some of the default colors :colors => { :object_addr_prefix => :yellow, :comma => :white, }, # enable color :init_color => true, } # initialize wirble with options above Wirble.init(wirble_opts) Wirble.colorize

Re: Wirble
Wed Mar 14 00:56:33 2007 :: Link :: Posted by rictic
I love this, even if I'm just using it for the colorization. If only terminal color codes supported more colors. Anyway, one small bug to report, regular expression literals don't display the slashes when colors are enabled: with colorization: irb(main):001:0> /hello/ => hello normal (correct) behavior: irb(main):001:0> /hello/ => /hello/ Thanks :)

Re: Wirble
Mon Apr 2 16:34:27 2007 :: Link :: Posted by rtaljun
I couldn't find the Wirble bug tracker...but I found an interesting bug. With Wirble enabled, when I type: require 'mathn'; 2/3 #=> 23 also, require 'mathn'; (2/3).class #=> Rational it appears to me that it concatenates the two numbers as strings then outputs then as a Rational? Or it's some sort of error with the way Wirble represents fractional values. Thanks for making a great irb enhancement, though! I've used Wirble since it was first announced.

Re: Wirble
Thu Sep 27 09:31:43 2007 :: Link :: Posted by willf
save_history has a bug, I believe This is an error. (line 83 or so): # lines = lines[-max_size, -1] if lines.size > max_size Use this instead: lines = lines.last(max_size)

Navigation

Previous . Next -- Display entries.