Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.CommandLine.Completion
Contents
Synopsis
- exactComplete :: String -> [String] -> [Completion]
- prefixCompleteTermOrType :: String -> ProjectPath -> Transaction [Completion]
- prefixCompleteTerm :: String -> ProjectPath -> Transaction [Completion]
- prefixCompleteType :: String -> ProjectPath -> Transaction [Completion]
- noCompletions :: MonadIO m => String -> Codebase m v a -> AuthenticatedHttpClient -> ProjectPath -> m [Completion]
- prefixCompleteNamespace :: String -> ProjectPath -> Transaction [Completion]
- fixupCompletion :: String -> [Completion] -> [Completion]
- haskelineTabComplete :: MonadIO m => Map String InputPattern -> Codebase m v a -> AuthenticatedHttpClient -> ProjectPath -> CompletionFunc m
- completeShareUser :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion]
- completeShareProject :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion]
- completeShareBranchOrRelease :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion]
- filenameCompletion :: MonadIO m => String -> m [Completion]
- prettyCompletion :: Bool -> (String, Pretty ColorText) -> Completion
Completers
exactComplete :: String -> [String] -> [Completion] Source #
Constructs a list of Completion
s from a query and completion options by
filtering them for prefix matches. A completion will be selected if it's an exact match for
a provided option.
prefixCompleteTermOrType :: String -> ProjectPath -> Transaction [Completion] Source #
Completes a term or type argument by prefix-matching against the query.
prefixCompleteTerm :: String -> ProjectPath -> Transaction [Completion] Source #
Completes a term argument by prefix-matching against the query.
prefixCompleteType :: String -> ProjectPath -> Transaction [Completion] Source #
Completes a term or type argument by prefix-matching against the query.
noCompletions :: MonadIO m => String -> Codebase m v a -> AuthenticatedHttpClient -> ProjectPath -> m [Completion] Source #
The empty completor.
prefixCompleteNamespace :: String -> ProjectPath -> Transaction [Completion] Source #
Completes a namespace argument by prefix-matching against the query.
fixupCompletion :: String -> [Completion] -> [Completion] Source #
haskelineTabComplete :: MonadIO m => Map String InputPattern -> Codebase m v a -> AuthenticatedHttpClient -> ProjectPath -> CompletionFunc m Source #
A completion func for use with Haskeline
completeShareUser :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion] Source #
Completes a user handle by searching Share.
completeShareProject :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion] Source #
Does progressive tab-completion, so if you're working on the user-segment it'll complete that, then if you mash tab
it'll proceed to project completion.
E.g. "uni" -> "
unison/"
Then "unison/" -> "
unison/base"
completeShareBranchOrRelease :: MonadIO m => AuthenticatedHttpClient -> String -> m [Completion] Source #
Does progressive tab-completion, so if you're working on the user-segment it'll complete that, then if you mash tab
it'll proceed to project completion, then branch or release completion.
E.g. "uni" -> "
unison/"
Then "unison/" -> "
unisonbase"
Then "unisonbase" -> "
unisonbasemain"
or "unisonbase
cont" -> "unisonbase
contributor/"
or "unisonbase
contributor" -> "@unisonbase@contributorfeature"
or "unisonbasereleases/lat" -> "
unisonbasereleases/latest"
or "unisonbasereleases/1." -> "
unisonbasereleases/1.2.3"
filenameCompletion :: MonadIO m => String -> m [Completion] Source #
prettyCompletion :: Bool -> (String, Pretty ColorText) -> Completion Source #