optparse-applicative-0.18.0.0: Utilities and combinators for parsing command line options
Safe HaskellSafe-Inferred
LanguageHaskell98

Options.Applicative.Builder.Completer

Synopsis

Documentation

data Completer Source #

A shell complete function.

mkCompleter :: (String -> IO [String]) -> Completer Source #

Smart constructor for a Completer

listIOCompleter :: IO [String] -> Completer Source #

Create a Completer from an IO action

listCompleter :: [String] -> Completer Source #

Create a Completer from a constant list of strings.

bashCompleter :: String -> Completer Source #

Run a compgen completion action.

Common actions include file and directory. See http://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html#Programmable-Completion-Builtins for a complete list.

requote :: String -> String Source #

Strongly quote the string we pass to compgen.

We need to do this so bash doesn't expand out any ~ or other chars we want to complete on, or emit an end of line error when seeking the close to the quote.