import { BaseCommand } from "https://dotland.deno.dev/x/cliffy@v0.8.0/packages/command/lib/base-command.ts";
Base command implementation without pre configured command's and option's.
Properties
Methods
Parse command line args definition.
Match commands and arguments from command line arguments.
Split arguments string into args and types: -v, --verbose [arg:boolean]
Don't throw an error if the command was called without arguments.
Set default command. The default command will be called if no action handler is registered.
Handle error. If .throwErrors()
was called all error's will be thrown, otherwise Deno.exit(1)
will be called.
Get sub-command with given name.
Get environment variable with given name.
Get global option from parent command's by name.
Checks whether the command has a sub-command with given name or not.
Checks whether the command has an environment variable with given name or not.
Checks whether the command has an option with given name or not.
Parse command line arguments and execute matched command.
Throw error's instead of calling Deno.exit()
to handle error's manually.
This has no effect for parent commands. Only for the command on which this method was called and all child commands.
Disable parsing arguments. If enabled the raw arguments will be passed to the action handler. This has no effect for parent or child commands. Only for the command on which this method was called.