Showing posts with label Wirble. Show all posts
Showing posts with label Wirble. Show all posts

Monday, May 2, 2011

Utility Belt

Utility Belt is a grab-bag of tricks, tools, techniques, trifles, and toys for IRB, including convenience methods, language patches, and useful extensions. It also includes a couple command-line widgets. Its primary inspirations were an awesome gem called Wirble and a blog post by Amy Hoy called "Secrets Of The Rails Console Ninjas".

FEATURES

  • Interactively edit IRB code in your preferred text editor
  • Read from and write to OS X clipboard
  • Post your code to Pastie with one command (OS X only)
  • Kick-ass Unix-style history buffer
  • Write command history to file or vi
  • Grep classes and methods for strings
  • Verbosity controls for regular IRB and Rails console
  • Finder shortcuts for Rails console
  • Upload shortcut for Amazon S3
  • Command-line Amazon S3 upload script
  • Command-line Google shortcut (OS X only)
  • Auto-indentation
  • _ special variable (like Unix shell var !!)
  • Extremely basic themes for Wirble syntax coloring
  • Pascal/JavaScript-style "with" statement
  • String#to_proc
  • Grammatically-correct is_an? method - no more "is_a? Array" statements
  • One-character exit command
http://utilitybelt.rubyforge.org/
http://www.rubyinside.com/irb-lets-bone-up-on-the-interactive-ruby-shell-1771.html
http://rors.org/2009/12/20/10-rails-console-tricks.html

Wednesday, November 24, 2010

Wirble: Tab-Completion and Syntax Coloring for irb

Wirble
If you haven't got tab-completion and syntax coloring in your irb, you owe it to yourself to follow these instructions right away (should work for Linux, OS X, and Cygwin users). First, install the Wirble gem:
sudo gem install wirble
Next, create or edit a file called .irbrc in your home folder (~/.irbrc), and make sure these lines are included there:
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
Now play with irb and see joy similar to that in the screenshot above. Try tab-completion too. It's great!