View Source Nexus.CLI.Input (nexus_cli v0.5.0)

Represents a command input, with args and flags values parsed

  • flags is a map with keys as flags names and values as flags values
  • args is a map of positional arguments where keys are the arguments names defined with the :as option on the value/2 macro
  • value is a single value term that represents the command value itself

If the command define multiple (positional) arguments, value will be nil and args willbe populated, otherwise args will be an empty map and value will be populated

Summary

Types

@type t() :: %Nexus.CLI.Input{
  args: %{required(atom()) => term()},
  flags: %{required(atom()) => term()},
  value: term() | nil
}