glint
Types
Input type for Runner.
pub type CommandInput {
CommandInput(args: List(String), flags: FlagMap)
}
Constructors
-
CommandInput(args: List(String), flags: FlagMap)
Functions
pub fn add_command(to root: Command, at path: List(String), do f: fn(
CommandInput,
) -> Nil, with flags: List(Flag)) -> Command
Add a new command to be run at the specified path. Ff the path is [] the root command is set with the provided function and flags
pub fn execute(cmd: Command, args: List(String)) -> Result(
Nil,
Snag,
)
Determines which command to run and executes it. Sets any provided flags if necessary. Flags are parsed as any value starting with a ‘-’