| Copyright | (c) Eric Mertens, 2016 |
|---|---|
| License | ISC |
| Maintainer | emertens@gmail.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Client.Commands.WordCompletion
Description
This module provides the tab-completion logic used for nicknames and channels.
Documentation
class (IsString a, Ord a) => Prefix a Source #
Class for types that are isomorphic to String
and which can support a total order and a prefix
predicate.
toString(fromStringx) == xfromString(toStringx) == xisPrefixx y ==> x<=y
Minimal complete definition
isPrefix, toString
Arguments
| :: Prefix a | |
| => (String -> String) | leading update operation |
| -> Bool | reversed |
| -> [a] | priority completions |
| -> [a] | possible completions |
| -> EditBox | |
| -> Maybe EditBox |
Perform word completion on a text box.
The leading update operation is applied to the result of tab-completion when tab completing from the beginning of the text box. This is useful when auto-completing a nick and including a trailing colon.
The reversed parameter indicates that tab-completion should return the
previous entry. When starting a fresh tab completion the priority completions
will be considered in order before resorting to the set of possible
completions.