Jacob v0.1.1 JacobCli.Commands.Help View Source

Help command

Return help informations about the current cli.

Link to this section Summary

Functions

This callback will be used by Jacob in order to initialize the argv

Link to this section Functions

This callback will be used by Jacob in order to initialize the argv.

It will remove the first argument in the argv list as it always is the command name.

e.g. When calling ./jacob foo bar the argv are ["foo", "bar"] and Jacob turns that into ["bar"]

Then the modified argv will be sent through all the initializer that your command defines.

You may define an initializer by anotating an existing funtion with the @initializer attribute, or by using the add_initializer/2 macro.

Initializers have to be defined as public functions.

Examples

Anotation without options

@initializer true
def my_initializer(argv, _opts), do: argv

Anotation with options

@initializer %{my: option}
def my_initializer(argv, opts = %{my: option}), do: argv

Callback implementation for Jacob.Command.Concerns.HasInitializers.initialize/1.