Proposal: add extra readline completion functionality

Judah Jacobson judah.jacobson at
Sun Feb 11 19:09:32 EST 2007

I propose adding some functionality to the readline package (really
just wrappers of variables from that library) which is necessary to
fix ghci bug #998.  See the proposed patch at as well as the bug
report at

The main addition is rl_completion_word_break_hook, which lets us
change the set of word break characters based on the context of the
line.  Specifically for ghci, this is needed to change whether "/" is
a word boundary (depending on whether we're expanding a Haskell name
or a filename).  Note that this variable is only present in readline
version 5.0 or later; I've put in some ifdef's to support compiling
against older versions.

I've also included get/set functions for the
rl_attempted_completion_over variable.  If it's set to nonzero,
readline won't use its default completer when our custom completer
returns no results.


More information about the Libraries mailing list