haskeline-0.3.2: A command-line interface for user input, written in Haskell.Source codeContentsIndex
type CompletionFunc m = String -> m (String, [Completion])
data Completion = Completion {
replacement :: String
display :: String
completeWord :: Monad m => Maybe Char -> String -> (String -> m [Completion]) -> CompletionFunc m
simpleCompletion :: String -> Completion
noCompletion :: Monad m => CompletionFunc m
completeFilename :: MonadIO m => CompletionFunc m
filenameWordBreakChars :: String
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
replacement :: StringText to insert in line.
display :: StringText to display when listing alternatives.
show/hide Instances
:: Monad m
=> Maybe CharAn optional escape character
-> StringList 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.
completeFilename :: MonadIO m => CompletionFunc mSource
filenameWordBreakChars :: StringSource
Produced by Haddock version 2.4.2