haskeline-0.2: A command-line interface for user input, written in Haskell.

System.Console.Haskeline.Completion

Synopsis

Documentation

type CompletionFunc m = String -> m (String, [Completion])Source

Performs completions from a reversed String. The output String is also reversed. Use completeWord to build these functions.

data Completion Source

Constructors

Completion 

Fields

replacement :: String

Text to insert in line.

display :: String

Text to display when listing alternatives.

Instances

completeWordSource

Arguments

:: Monad m 
=> Maybe Char

An optional escape character

-> String

List of characters which count as whitespace

-> (String -> m [Completion])

Function to produce a list of possible completions

-> CompletionFunc m 

The following function creates a custom CompletionFunc for use in the 'Settings.'

simpleCompletion :: String -> CompletionSource

Adds a space after the word when inserting it after expansion.

noCompletion :: Monad m => CompletionFunc mSource

Disable completion altogether.