Module Arg.Completion

Argument completion.

This modules provides a type to describe how argument values described by argument converters can be completed.

type complete = string -> (string * string) list

The type for completion functions. Given a prefix should return a list of possible completions and a doc string.

type 'a t

The type for completing values parsed into values of type 'a.

val make : ?files:bool -> ?dirs:bool -> ?complete:complete -> unit -> 'a t

make () is a completion specification with given properties. See accesors for semantics. Note that the properties are not mutually exclusive.

val files : 'a t -> bool

files c indicates the argument should be completed with files.

val dirs : 'a t -> bool

dirs c indicates the argument should be completed with directories.

val complete : 'a t -> complete

complete c is a function to perform completion.