`sig
exception Invalid_arguments of string list
module Flag :
sig
type 'a t
val name : 'a Deprecated_command.Flag.t -> string
type ('a, 'b) create =
string ->
?aliases:string list ->
?full_flag_required:bool ->
'b -> doc:string -> 'a Deprecated_command.Flag.t
val of_arg : Core.Std.Arg.t -> unit Deprecated_command.Flag.t
val noarg : (unit, unit -> unit) Deprecated_command.Flag.create
val string : (unit, string -> unit) Deprecated_command.Flag.create
val int : (unit, int -> unit) Deprecated_command.Flag.create
val float : (unit, float -> unit) Deprecated_command.Flag.create
val bool : (unit, bool -> unit) Deprecated_command.Flag.create
val gen :
(string -> 'gen) ->
(unit, 'gen -> unit) Deprecated_command.Flag.create
val set_string :
(unit, string Pervasives.ref) Deprecated_command.Flag.create
val set_string_opt :
(unit, string option Pervasives.ref) Deprecated_command.Flag.create
val set_int : (unit, int Pervasives.ref) Deprecated_command.Flag.create
val set_int_opt :
(unit, int option Pervasives.ref) Deprecated_command.Flag.create
val set_float :
(unit, float Pervasives.ref) Deprecated_command.Flag.create
val set_float_opt :
(unit, float option Pervasives.ref) Deprecated_command.Flag.create
val set_date :
(unit, Core.Std.Date.t Pervasives.ref) Deprecated_command.Flag.create
val set_date_opt :
(unit, Core.Std.Date.t option Pervasives.ref)
Deprecated_command.Flag.create
val set : (unit, bool Pervasives.ref) Deprecated_command.Flag.create
val clear : (unit, bool Pervasives.ref) Deprecated_command.Flag.create
val set_gen :
(string -> 'gen) ->
(unit, 'gen Pervasives.ref) Deprecated_command.Flag.create
val set_gen_opt :
(string -> 'gen) ->
(unit, 'gen option Pervasives.ref) Deprecated_command.Flag.create
val noarg_acc : ('a, 'a -> 'a) Deprecated_command.Flag.create
val string_acc :
('a, 'a -> string -> 'a) Deprecated_command.Flag.create
val int_acc : ('a, 'a -> int -> 'a) Deprecated_command.Flag.create
val bool_acc : ('a, 'a -> bool -> 'a) Deprecated_command.Flag.create
val float_acc : ('a, 'a -> float -> 'a) Deprecated_command.Flag.create
val date_acc :
('a, 'a -> Core.Std.Date.t -> 'a) Deprecated_command.Flag.create
val rest_acc :
('a, 'a -> string list -> 'a) Deprecated_command.Flag.create
val gen_acc :
(string -> 'gen) ->
('a, 'a -> 'gen -> 'a) Deprecated_command.Flag.create
val noarg_mut : ('a, 'a -> unit) Deprecated_command.Flag.create
val arg_mut : ('a, 'a -> string -> unit) Deprecated_command.Flag.create
val string_mut :
('a, 'a -> string -> unit) Deprecated_command.Flag.create
val int_mut : ('a, 'a -> int -> unit) Deprecated_command.Flag.create
val bool_mut : ('a, 'a -> bool -> unit) Deprecated_command.Flag.create
val float_mut :
('a, 'a -> float -> unit) Deprecated_command.Flag.create
val date_mut :
('a, 'a -> Core.Std.Date.t -> unit) Deprecated_command.Flag.create
val rest_mut :
('a, 'a -> string list -> unit) Deprecated_command.Flag.create
val gen_mut :
(string -> 'gen) ->
('a, 'a -> 'gen -> unit) Deprecated_command.Flag.create
module Action :
sig
type 'accum t
val noarg :
('accum -> unit) -> 'accum Deprecated_command.Flag.Action.t
val arg :
('accum -> string -> unit) ->
'accum Deprecated_command.Flag.Action.t
val rest :
('accum -> string list -> unit) ->
'accum Deprecated_command.Flag.Action.t
val int :
('accum -> int -> unit) ->
'accum Deprecated_command.Flag.Action.t
val bool :
('accum -> bool -> unit) ->
'accum Deprecated_command.Flag.Action.t
val float :
('accum -> float -> unit) ->
'accum Deprecated_command.Flag.Action.t
end
val create :
?aliases:string list ->
?full_flag_required:bool ->
name:string ->
doc:string ->
'a Deprecated_command.Flag.Action.t -> 'a Deprecated_command.Flag.t
val lift :
'a Deprecated_command.Flag.t ->
project:('b -> 'a * ('a -> 'b)) -> 'b Deprecated_command.Flag.t
val lift_unit :
unit Deprecated_command.Flag.t -> 'any Deprecated_command.Flag.t
val to_spec :
('accum -> 'accum) Pervasives.ref ->
'accum Deprecated_command.Flag.t -> ('c, 'c) Core.Std.Command.Spec.t
val to_spec_unit :
unit Deprecated_command.Flag.t -> ('c, 'c) Core.Std.Command.Spec.t
val to_spec_units :
unit Deprecated_command.Flag.t list ->
('c, 'c) Core.Std.Command.Spec.t
end
module Shared_flags :
sig
type 'a t = {
flags : unit Deprecated_command.Flag.t list;
get : unit -> 'a;
}
end
type t
module Autocomplete :
sig
type t = string list -> string list
module Bash_action :
sig
type t =
[ `Alias
| `Arrayvar
| `Binding
| `Builtin
| `Command
| `Directory
| `Disabled
| `Enabled
| `Export
| `File
| `Function
| `Group
| `Helptopic
| `Hostname
| `Job
| `Keyword
| `Running
| `Service
| `Setopt
| `Shopt
| `Signal
| `Stopped
| `User
| `Variable ]
end
val bash :
Deprecated_command.Autocomplete.Bash_action.t list ->
Deprecated_command.Autocomplete.t
end
val create :
?autocomplete:Deprecated_command.Autocomplete.t ->
?readme:(unit -> string) ->
summary:string ->
usage_arg:string ->
init:(unit -> 'accum) ->
flags:'accum Deprecated_command.Flag.t list ->
final:('accum -> string list -> 'argv) ->
('argv -> unit) -> Deprecated_command.t
val create0 :
?autocomplete:Deprecated_command.Autocomplete.t ->
?readme:(unit -> string) ->
summary:string ->
usage_arg:string ->
init:(unit -> 'accum) ->
flags:'accum Deprecated_command.Flag.t list ->
final:('accum -> 'args) -> ('args -> unit) -> Deprecated_command.t
val create_no_accum :
?autocomplete:Deprecated_command.Autocomplete.t ->
?readme:(unit -> string) ->
summary:string ->
usage_arg:string ->
flags:unit Deprecated_command.Flag.t list ->
final:(string list -> 'args) -> ('args -> unit) -> Deprecated_command.t
val create_no_accum0 :
?autocomplete:Deprecated_command.Autocomplete.t ->
?readme:(unit -> string) ->
summary:string ->
usage_arg:string ->
flags:unit Deprecated_command.Flag.t list ->
(unit -> unit) -> Deprecated_command.t
val group :
summary:string ->
?readme:(unit -> string) ->
(string * Deprecated_command.t) list -> Deprecated_command.t
type 'a with_run_flags =
?version:string ->
?build_info:string ->
?argv:string list ->
?allow_unknown_flags:bool ->
?allow_underscores:bool ->
?hash_bang_expand:bool ->
?post_parse:([ `Error | `Help | `Ok ] -> string list -> unit) ->
Deprecated_command.t -> 'a
val run : unit Deprecated_command.with_run_flags
val get_expanded_argv : unit -> string list
val get_expanded_cmdline : unit -> string
module Version :
sig
val command :
?version:string -> ?build_info:string -> unit -> Deprecated_command.t
val print_version : ?version:string -> unit -> unit
end
module Annotated_field :
sig
type t
type accum
val required :
?name:string ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, 'b) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val default :
?name:string ->
'field ->
('field -> string) ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, 'field) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val optional :
?name:string ->
?suppress_word_optional:bool ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, 'b option) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val set :
?name:string ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, bool) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val clear :
?name:string ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, bool) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val list :
?name:string ->
Deprecated_command.Annotated_field.t list ->
doc:string ->
('a, 'b list) Fieldslib.Field.t ->
Deprecated_command.Annotated_field.t list
val init :
Deprecated_command.Annotated_field.t list ->
Deprecated_command.Annotated_field.accum
val to_flag :
Deprecated_command.Annotated_field.t ->
Deprecated_command.Annotated_field.accum Deprecated_command.Flag.t
val get :
Deprecated_command.Annotated_field.accum ->
(string -> 'field) -> ('a, 'field) Fieldslib.Field.t -> 'field
val get_opt :
Deprecated_command.Annotated_field.accum ->
(string -> 'field) ->
('a, 'field option) Fieldslib.Field.t -> 'field option
val get_list :
Deprecated_command.Annotated_field.accum ->
(string -> 'field) ->
('a, 'field list) Fieldslib.Field.t -> 'field list
end
module Flags_ext :
sig
type 'a setter = No_arg of 'a | Arg of (string -> 'a)
type ('a, 'flag) t
val flag : ('a, 'flag) Deprecated_command.Flags_ext.t -> 'flag
val get : ('a, 'b) Deprecated_command.Flags_ext.t -> 'a
val is_set : ('a, 'b) Deprecated_command.Flags_ext.t -> bool
val create_optional :
name:string ->
doc:string ->
'a Deprecated_command.Flags_ext.setter ->
('a option, unit Deprecated_command.Flag.t)
Deprecated_command.Flags_ext.t
val create :
?default:'a * ('a -> string) ->
name:string ->
doc:string ->
'a Deprecated_command.Flags_ext.setter ->
('a, unit Deprecated_command.Flag.t) Deprecated_command.Flags_ext.t
val create_many :
?at_least_one:bool ->
name:string ->
doc:string ->
'a Deprecated_command.Flags_ext.setter ->
('a list, unit Deprecated_command.Flag.t)
Deprecated_command.Flags_ext.t
val create_choice :
?default:'a * ('a -> string) ->
(string * string * 'a Deprecated_command.Flags_ext.setter) list ->
('a, unit Deprecated_command.Flag.t list)
Deprecated_command.Flags_ext.t
val create_choice_optional :
(string * string * 'a Deprecated_command.Flags_ext.setter) list ->
('a option, unit Deprecated_command.Flag.t list)
Deprecated_command.Flags_ext.t
val create_set :
name:string ->
doc:string ->
(bool, unit Deprecated_command.Flag.t) Deprecated_command.Flags_ext.t
val create_rest :
?name:string ->
doc:string ->
unit ->
(string list option, unit Deprecated_command.Flag.t)
Deprecated_command.Flags_ext.t
end
module Helpers :
sig
exception Found_anonymous_arguments
val no_anons : 'a -> string list -> 'a
end
val of_core_command : Core.Std.Command.t -> Deprecated_command.t
end`