Permalink
Browse files

update docs

  • Loading branch information...
1 parent b840f3b commit fed325116efe345b2327616754512bf6c07b843e @cldwalker committed Jan 11, 2011
Showing with 27 additions and 17 deletions.
  1. +24 −14 README.rdoc
  2. +1 −0 lib/bond/readlines/jruby.rb
  3. +1 −3 lib/bond/readlines/rawline.rb
  4. +1 −0 lib/bond/readlines/ruby.rb
View
@@ -1,32 +1,42 @@
-Note: To read a linked version of this README, {click here}[http://tagaholic.me/bond/doc/]
-
== Description
-Bond is on a mission to improve autocompletion in ruby, especially for ripl/irb. Aside from doing
+Bond is on a mission to improve autocompletion in ruby, especially for irb/ripl. Aside from doing
everything irb's can do and fixing its quirks, Bond can autocomplete argument(s) to methods,
-uniquely completing per module, per method and per argument. Bond brings irb's completion closer to
-bash/zsh as it provides a configuration system and a DSL for creating custom completions and
-completion rules. With this configuration system, users can customize their irb autocompletions and
+uniquely completing per module, per method and per argument. Bond brings ruby autocompletion closer
+to bash/zsh as it provides a configuration system and a DSL for creating custom completions and
+completion rules. With this configuration system, users can customize their autocompletions and
share it with others. Bond can also load completions that ship with gems. Bond is able to offer
-more than irb's completion since it uses a Readline C extension to get the full line of input when
-completing as opposed to irb's last-word approach.
+more than irb's completion since it uses the full line of input when completing as opposed to irb's
+last-word approach.
== Install
-Install the gem with:
+To use bond with {Readline}[http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html] (version >=
+5.6 recommended) or JLine for JRuby users, install the gem with:
+
+ gem install bond
+
+To use bond with {a pure ruby readline}[https://github.com/luislavena/rb-readline] i.e. Windows
+users or users without Readline:
+
+ gem install bond rb-readline -- --without-readline
- sudo gem install bond
+To use bond without readline support (and presumably use your own readline plugin):
+
+ gem install bond -- --without-readline
== Setup
-To start off, replace irb's completion (require 'irb/completion') with Bond's enhanced version in your irbrc :
+If you're using {ripl}[http://github.com/cldwalker/ripl] instead of irb, bond is already setup.
+
+To start off, replace irb's completion (require 'irb/completion') with Bond's enhanced version in your irbrc:
require 'bond'
Bond.start
+ # For users using a pure ruby readline
+ Bond.start :readline => :ruby
-If you're using {ripl}[http://github.com/cldwalker/ripl], bond is used by default.
-
-This gives you more consistent method completion on any object, customizable completions
+This setup gives you more consistent method completion on any object, customizable completions
and argument completion of some 80+ methods including Hash#[], Kernel#system, Kernel#require and some Rails methods.
== Method Argument Completion
@@ -1,3 +1,4 @@
+# Readline for Jruby
class Bond::Jruby < Bond::Readline
def self.readline_setup
require 'readline'
@@ -1,6 +1,4 @@
-# A readline plugin for use with {Rawline}[http://github.com/h3rald/rawline].
-# This plugin should be used in conjunction with {a Rawline
-# shell}[http://www.h3rald.com/articles/real-world-rawline-usage].
+# A pure ruby readline which requires {rawline}[http://github.com/h3rald/rawline].
class Bond::Rawline < Bond::Readline
def self.setup(agent)
require 'rawline'
@@ -1,3 +1,4 @@
+# A pure ruby readline which requires {rb-readline}[https://github.com/luislavena/rb-readline].
class Bond::Ruby < Bond::Readline
def self.readline_setup
require 'rb-readline'

0 comments on commit fed3251

Please sign in to comment.