Currently the completion_proc given to Readline gets one
parameter only, the 'current word' being completed. On
occasion, it is useful to be able to see the entire
line of input. Currently the only workaround is to
hack basic_word_break_characters to something non-
printable. The patch provides two new methods:
Readline.completion_with_context_proc=
Readline.completion_with_context_proc
This patch is backwards-compatibile while providing new
functionality. Usage is identical to current.
Usage example:
require 'readline'
Readline.completion_with_context_proc = lambda {|word, line| # ...} |