Readline.completion_proc = proc { |input|
case input
else
pp input
end
}
Readline.completion_case_fold = true # ignore case
_ = Readline.readline(’ > ',true)
Now run this, and type:
“abc def”
then hit the TAB key.
The output should be:
“def”
Now my question - is there a way in ruby to capture the FULL line,
with readline? Including “abc”?
I need to react on whatever the user used here, and give him
different completion like abilities, just as you can do in
bash shell, with different commands.