- 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
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
Completion | |
|
:: 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.
completeFilename :: MonadIO m => CompletionFunc mSource