lib/ripl/completion.rb in ripl-0.1.2 vs lib/ripl/completion.rb in ripl-0.2.0
- old
+ new
@@ -1,11 +1,9 @@
-module Ripl
- module Completion
- def start_completion
- require 'bond'
- Bond.start
- true
- rescue LoadError
- false
- end
+require 'bond'
+
+module Ripl::Completion
+ def before_loop
+ super
+ Bond.start(config[:completion] || {}) unless Bond.started?
end
end
+Ripl::Shell.send :include, Ripl::Completion