Skip to content

Commit

Permalink
allow :readline option to take a string
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Jan 11, 2011
1 parent 086fce5 commit a934c0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lib/ripl/shell.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class Ripl::Shell
def self.create(options={})
require 'readline' if options[:readline]
require 'ripl/readline' if options[:readline]
if options[:readline]
require options[:readline] == true ? 'readline' : options[:readline]
require 'ripl/readline'
end
require 'ripl/completion' if options[:completion]
new(options)
rescue LoadError
Expand Down
2 changes: 1 addition & 1 deletion man/ripl.1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ A string or lambda to generate string that prompts user for input\. Default is \
.
.TP
\fB:readline\fR
A boolean to enable Readline\. Default is true\.
A boolean or string to enable Readline\. Default is true\. If a string, requires the readline\-like library\.
.
.TP
\fB:result_prompt\fR
Expand Down
2 changes: 1 addition & 1 deletion man/ripl.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ripl.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Ripl.config is a hash with the following keys:
A string or lambda to generate string that prompts user for input. Default is '>> '.

* `:readline`:
A boolean to enable Readline. Default is true.
A boolean or string to enable Readline. Default is true. If a string, requires the readline-like library.

* `:result_prompt`:
A string that prefixes the result of an eval. Default is '=> '.
Expand Down

0 comments on commit a934c0d

Please sign in to comment.