Hi Ben,
I have been thinking about the issue of setting global readline variables
already. I thought about writing one c-function and adding a number of static
final int variables to the Readline-class. These could be private, the public
methods (e.g. setInhibitCompletion()) would then all call the same method
with the correct constant. On the other hand, if the variables were public,
there would be even less java-functions (e.g.
setReadlineVar(INHIBIT_COMPLETION,INHIBIT_COMPLETION_TRUE))
There are in fact quite a number of variables which could be exposed this way.
What do you think about that?
Bernhard
> Hi. Attached is a patch for java-readline that adds two extra functions:
>
> setInhibitCompletion(bool)
> getInhibitCompletion()
>
> These functions correspond to setting and retrieving the global readline
> variable rl_inhibit_completion, which switches tab completion on and off.
>
> Inhibiting tab completion is particularly important for jython, since you
> frequently want to insert tab characters directly into the input line. If
> you're happy with this patch then I'll submit a patch for jython that where
> possible calls setInhibitCompletion(false) upon initialisation of a
> ReadlineConsole.
>
> I've tested these patches under both GNU readline and BSD editline.
>
|