Readline extension - access to linebuffer?

D

Dave Baldwin

readline gurus,

Is there anyway to gain access to the readline extension's line
buffer from Ruby? The gnu readline docs show mechanisms for doing so
but it doesn't look like the ruby extension wraps these. I don't
want to enhance the extension as this makes deploying my app a bit
more involved so I am looking for a pure Ruby way to gain access.

My reason for wanting this is to have a context dependent completion
function (i.e. it depends on which 'word' you are on). I have been
able to fake this by changing the complete_word_break_character to a
non useful character (7 - bell). This gave me the whole line to
complete with. Unfortunately tab tab (to show the list of possible
completion) now includes the line as a prefix to the possible
completion values.

Any ideas?

Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top