So, yes, the original input “abc” no longer has anything to do with the
end result.
Is this possible? So far I am using Readline only to do something like:
“do”
expand into
"do_action "
But it would be kind of neat to both append something specifically after
TAB was pressed, and to also completely change the original input at the
same time.
On Tue, Oct 04, 2011 at 10:07:52PM +0900, Marc H. wrote:
“do”
expand into
"do_action "
But it would be kind of neat to both append something specifically after
TAB was pressed, and to also completely change the original input at the
same time.
This is certainly possible using rb-readline[1] (pure Ruby port of GNU
Readline), but I doubt that the C binding to GNU Readline provides
enough hooks.
As a rough starting point, you could look at rl_bind_key() to redefine
the behaviour of \t. Some methods and variables to look at are: