optionNames : List String Names of all command line options (prefixed with "-" in case of
single-character option names and with "--" in case of multi-character
option names.
Totality: total
Visibility: exportrecord ParsedArgs : (0 c : Type) -> {auto 0 _ : Command c} -> Type A Package of the current directory, current command, its arguments, and the
options.
Totality: total
Visibility: public export
Constructor: MkParsedArgs : CurDir -> CommandWithArgs c -> List AdjConf -> ParsedArgs c
Projections:
.cmd : ParsedArgs c -> CommandWithArgs c .curDir : ParsedArgs c -> CurDir .opts : ParsedArgs c -> List AdjConf
.curDir : ParsedArgs c -> CurDir- Totality: total
Visibility: public export curDir : ParsedArgs c -> CurDir- Totality: total
Visibility: public export .cmd : ParsedArgs c -> CommandWithArgs c- Totality: total
Visibility: public export cmd : ParsedArgs c -> CommandWithArgs c- Totality: total
Visibility: public export .opts : ParsedArgs c -> List AdjConf- Totality: total
Visibility: public export opts : ParsedArgs c -> List AdjConf- Totality: total
Visibility: public export getArgs' : HasIO io => io (List String) Get the arguments (not including the defacto first argument that is the
name of the binary).
Totality: total
Visibility: exportparseOpts : (0 c : Type) -> {auto {conArg:5741} : Command c} -> CurDir -> List String -> Either PackErr (ParsedArgs c) Given the current directory (from which pack was
invoked) parse the arguments into a command, positional arguments, and
options.
Totality: total
Visibility: exportapplyArgs : (0 c : Type) -> {auto {conArg:5848} : Command c} -> MetaConfig -> ParsedArgs c -> Either PackErr MetaConfig Given the current directory (from which pack was invoked)
and an initial config assembled from the `pack.toml` files
in scope, generates the application
config and command to run from a list of command
line arguments.
@ c : Type representing the command to run
We abstract over this type, because pack and
pack-admin accept different kinds of commands,
and both applications use this function to parse
the command line args
@ curDir : Current working directory
@ init : Initial config (possibly assebled from `pack.toml` files)
@ args : List of command line arguments
Totality: total
Visibility: exportusageInfo : String Application info printed with the `help` action.
Totality: total
Visibility: export