package opam-client
Install
Dune Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=e1202a21d669d460b9fa852e39f0502e
sha512=fb46bc8f12e49c2da95c5f8669f55fb93710ee826827538852c3091ec2c714c082137373fa9e1ad3f53f107b1fae6c2abd0b6e5f84f7756bd3b38e57978f080e
doc/opam-client/OpamConfigCommand/index.html
Module OpamConfigCommand
Source
Functions handling the `opam config` subcommand and configuration actions
`opam config` subcommand and their associated commands
val env :
'a OpamStateTypes.global_state ->
OpamTypes.switch ->
?set_opamroot:bool ->
?set_opamswitch:bool ->
csh:bool ->
sexp:bool ->
fish:bool ->
inplace_path:bool ->
unit
Display the current environment. Booleans csh, sexp and fish set an alternative output (unspecified if more than one is true, sh-style by default). inplace_path
changes how the PATH variable is updated when there is already an opam entry: either at the same rank, or pushed in front.
Ensures that the environment file exists in the given switch, regenerating it, if necessary.
Like env
but allows one to specify the precise env to print rather than compute it from a switch state
Display the content of all available packages variables
Substitute files
Prints expansion of variables in string
val exec :
[< OpamStateTypes.unlocked ] OpamStateTypes.global_state ->
set_opamroot:bool ->
set_opamswitch:bool ->
inplace_path:bool ->
string list ->
unit
Execute a command in a subshell, after variable expansion
Variables and options display and setting
Functions handling `opam var` and `opam option` command
Given an `opam option` field or field-value argument, detect the scope, switch, global or nonexistent field (cf. OpamCommands.Var_Option_Common.var_option
)
Setting variables and options
Update operation type
Parse an update operation. String is of the form var[(+=|-=|=)[value]]
. If 'value' is absent, it is a revert operation. Raise Invalid_argument
if the string is malformed
As parse_update
but parse only overwrites and reverts. String is of the form var=[value]
`. Raise Invalid_argument
if the string is malformed
val set_opt_global :
OpamStateTypes.rw OpamStateTypes.global_state ->
string ->
update_op ->
OpamStateTypes.rw OpamStateTypes.global_state
set_opt_global gt field value
updates global config field with update value in <opamroot>/config file. Modifiable fields are a subset of all defined fields in OpamFile.Config.t
. On revert, field is reverted to its initial value as defined in OpamInitDefaults.init_config
, to default value otherwise (OpamFile.Config.empty
). May raise OpamStd.Sys.Exit 2
.
val set_opt_switch :
'a OpamStateTypes.global_state ->
?st:OpamStateTypes.rw OpamStateTypes.switch_state ->
string ->
update_op ->
OpamStateTypes.rw OpamStateTypes.switch_state option
As set_opt_global
, set_opt_switch
updates switch config file in <opamroot>/<switch>/.opam-switch/switch-config. If switch state is given, uses its config and returns it with then new config. Otherwise, loads the raw switch state and returns None
.
val set_var_global :
OpamStateTypes.rw OpamStateTypes.global_state ->
string ->
whole_op ->
OpamStateTypes.rw OpamStateTypes.global_state
set_var_global
and set_var_switch
update respectively `global-variables` field in global config and `variables` field in switch config, by appending the new variables to current set. If switch state is given, uses its config and returns it with then new config. Otherwise, loads the raw switch state and returns None
. May raise OpamStd.Sys.Exit 2
.
val set_var_switch :
'a OpamStateTypes.global_state ->
?st:OpamStateTypes.rw OpamStateTypes.switch_state ->
string ->
whole_op ->
OpamStateTypes.rw OpamStateTypes.switch_state option
Display list of variables and options
List switch and/or global fields/sections and their value. If switch state is given, uses its config, otherwise loads the raw switch state.
val options_list :
?st:OpamStateTypes.unlocked OpamStateTypes.switch_state ->
'a OpamStateTypes.global_state ->
unit
val options_list_switch :
?st:OpamStateTypes.unlocked OpamStateTypes.switch_state ->
'a OpamStateTypes.global_state ->
unit
List switch and/or global variables and their value. If switch state is given, uses its config, otherwise loads the raw switch state.
val vars_list_switch :
?st:'a OpamStateTypes.switch_state ->
'b OpamStateTypes.global_state ->
unit
Display a variable and option
Display field
name and content in the global / switch configuration. If switch state is given, uses its config, otherwise loads the raw switch state.
val option_show_switch :
'a OpamStateTypes.global_state ->
?st:OpamStateTypes.unlocked OpamStateTypes.switch_state ->
string ->
unit
Display var
name and content in the global / switch configuration. Look first in the raw switch_state, if not found, uses the given switch state or loads one.
val var_show_switch :
'a OpamStateTypes.global_state ->
?st:'b OpamStateTypes.switch_state ->
string ->
unit