package opam-client
Module OpamArgSource
Command-line argument parsers and helpers
Helpers and argument constructors
val mk_opt :
?section:string ->
?vopt:'a ->
string list ->
string ->
string ->
'a Cmdliner.Arg.converter ->
'a ->
'a Cmdliner.Term.tval mk_opt_all :
?section:string ->
?vopt:'a ->
?default:'a list ->
string list ->
string ->
string ->
'a Cmdliner.Arg.converter ->
'a list Cmdliner.Term.tFlags
--short
--installed-root
--shell
--dot-profile
--http/ --git/ --local
--jobs
package names
parameters
package list with optional constraints
package list with optional constraints
val atom_or_local_list :
[ `Atom of OpamTypes.atom
| `Filename of OpamTypes.filename
| `Dirname of OpamTypes.dirname ]
list
Cmdliner.Term.tval atom_or_dir_list :
[ `Atom of OpamTypes.atom | `Dirname of OpamTypes.dirname ] list
Cmdliner.Term.tGeneric argument list builder
val nonempty_arg_list :
string ->
string ->
'a Cmdliner.Arg.converter ->
'a list Cmdliner.Term.tGeneric argument list builder
Global options
type global_options = {debug_level : int option;verbose : int;quiet : bool;color : [ `Always | `Never | `Auto ] option;opt_switch : string option;yes : bool;strict : bool;opt_root : OpamTypes.dirname option;git_version : bool;external_solver : string option;use_internal_solver : bool;cudf_file : string option;solver_preferences : string option;best_effort : bool;safe_mode : bool;json : string option;no_auto_upgrade : bool;working_dir : bool;ignore_pin_depends : bool;
}Type for global options
Global options
Apply global options
Build options
Abstract type for build options
Build options
Instal and reinstall options
Applly build options
Package listing and filtering options
Man section name
Build a package selection filter
Man section name
val package_listing :
(force_all_versions:bool ->
OpamListCommand.package_listing_format)
Cmdliner.Term.tPackage selection filter based on the current state of packages (installed, available, etc.)
Converters
Repository name converter
URL converter
Filename converter
Filename converter also accepting "-" for stdin/stdout
Dirnam converter
val existing_filename_dirname_or_dash :
OpamFilename.generic_file option Cmdliner.Arg.converterPackage name converter
name{.version} (or name=version)
name.version (or name=version)
name{(.|=|!=|>|<|>=|<=)version} converter
val atom_or_local :
[ `Atom of OpamTypes.atom
| `Filename of OpamTypes.filename
| `Dirname of OpamTypes.dirname ]
Cmdliner.Arg.converterAccepts atom but also (explicit) file and directory names
val atom_or_dir :
[ `Atom of OpamTypes.atom | `Dirname of OpamTypes.dirname ]
Cmdliner.Arg.convertervar=value,... argument
Warnings string "+3..10-4"
Enumeration with a default command
Subcommands
A subcommand cmds, v, args, doc is the subcommand cmd, using the documentation doc and the list of documentation parameters args. If the subcommand is selected, return v.
val mk_subcommands :
'a subcommands ->
'a option Cmdliner.Term.t * string list Cmdliner.Term.tsubcommands cmds are the terms cmd and params. cmd parses which sub-commands in cmds is selected and params parses the remaining of the command-line parameters as a list of strings.
val mk_subcommands_with_default :
'a default subcommands ->
'a option Cmdliner.Term.t * string list Cmdliner.Term.tSame as mk_subcommand but use the default value if no sub-command is selected.
val make_command_alias :
('a Cmdliner.Term.t * Cmdliner.Term.info) ->
?options:string ->
string ->
'a Cmdliner.Term.t * Cmdliner.Term.infoCreate an alias for an existing command. options can be used to add extra options after the original command in the doc (eg like `unpin` is an alias for `pin remove`).
val bad_subcommand :
'a default subcommands ->
(string * 'a option * string list) ->
'b Cmdliner.Term.retbad_subcommand cmds cmd is a command return value denoting a parsing error of sub-commands.
val mk_subdoc :
?defaults:(string * string) list ->
'a subcommands ->
Cmdliner.Manpage.block listmk_subdoc cmds is the documentation block for cmds.
Misc
deprecated_option option default name instead displays a message if option if set to its non default value. instead, if present, is the new option/command to launch