optimus v0.1.7 Optimus

Link to this section Summary

Link to this section Types

Link to this type arg_spec()
arg_spec() :: [arg_spec_item]
Link to this type arg_spec_item()
arg_spec_item ::
  {:value_name, String.t} |
  {:help, String.t} |
  {:required, boolean} |
  {:parser, parser}
Link to this type custom_parser()
custom_parser() :: (String.t -> parser_result)
Link to this type error()
error() :: String.t
Link to this type flag_spec()
flag_spec() :: [flag_spec_item]
Link to this type flag_spec_item()
flag_spec_item ::
  {:short, String.t} |
  {:long, String.t} |
  {:help, String.t} |
  {:multiple, boolean}
Link to this type option_spec()
option_spec() :: [option_spec_item]
Link to this type option_spec_item()
option_spec_item ::
  {:value_name, String.t} |
  {:short, String.t} |
  {:long, String.t} |
  {:help, String.t} |
  {:multiple, boolean} |
  {:required, boolean} |
  {:parser, parser}
Link to this type parser()
parser() :: :integer | :float | :string | custom_parser
Link to this type parser_result()
parser_result() :: {:error, String.t} | {:ok, term}
Link to this type spec()
spec() :: [spec_item]
Link to this type spec_item()
spec_item ::
  {:name, String.t} |
  {:name, String.t} |
  {:version, String.t} |
  {:author, String.t} |
  {:about, String.t} |
  {:allow_unknown_args, boolean} |
  {:parse_double_dash, boolean} |
  {:args, [arg_spec]} |
  {:flags, [flag_spec]} |
  {:options, [option_spec]}
Link to this type subcommand_path()
subcommand_path() :: [atom]

Link to this section Functions

Link to this function fetch_subcommand(optimus, subcommand_path)
Link to this function fetch_subcommand(optimus, list, subcommand_name)
Link to this function from_yaml(filename)
from_yaml(filename :: String.t) :: {:ok, t} | {:error, error}
from_yaml(filename :: String.t) :: t | no_return
Link to this function from_yaml!(filename)
Link to this function new(props)
new(spec) :: {:ok, t} | {:error, [error]}
Link to this function new!(props)
new!(spec) :: t | no_return
Link to this function parse(optimus, command_line)
parse(t, [String.t]) ::
  {:ok, Optimus.ParseResult.t} |
  {:ok, subcommand_path, Optimus.ParseResult.t} |
  {:error, [error]} |
  {:error, subcommand_path, [error]} |
  :version |
  :help |
  {:help, subcommand_path}
Link to this function parse!(optimus, command_line, halt \\ &System.halt/1)
parse!(t, [String.t], (integer -> no_return)) ::
  Optimus.ParseResult.t |
  {subcommand_path, Optimus.ParseResult.t} |
  no_return