Proposal: add extra readline completion functionality
Judah Jacobson
judah.jacobson at gmail.com
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
http://hackage.haskell.org/trac/ghc/ticket/1141 as well as the bug
report at http://hackage.haskell.org/trac/ghc/ticket/998
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.
Thanks,
-Judah
More information about the Libraries
mailing list