gunshi / default / CommandEnvironment
Interface: CommandEnvironment<Options> 
Command environment.
Type Parameters 
| Type Parameter | Default type | 
|---|---|
Options extends ArgOptions | ArgOptions | 
Properties 
| Property | Type | Description | 
|---|---|---|
 cwd | undefined | string | Current working directory. See CommandOptions.cwd | 
 description | undefined | string | Command description. See CommandOptions.description | 
 leftMargin | number | Left margin of the command output. Default 2 See CommandOptions.leftMargin | 
 middleMargin | number | Middle margin of the command output. Default 10 See CommandOptions.middleMargin | 
 name | undefined | string | Command name. See CommandOptions.name | 
 renderHeader | undefined | null | (ctx) => Promise<string> | Render function the header section in the command usage. | 
 renderUsage | undefined | null | (ctx) => Promise<string> | Render function the command usage. | 
 renderValidationErrors | undefined | null | (ctx, error) => Promise<string> | Render function the validation errors. | 
 subCommands | | undefined | Map<string, | Command<any> | LazyCommand<any>> | Sub commands. See CommandOptions.subCommands | 
 usageOptionType | boolean | Whether to display the usage option type. Default false See CommandOptions.usageOptionType | 
 usageSilent | boolean | Whether to display the command usage. Default false See | 
 version | undefined | string | Command version. See CommandOptions.version | 
