Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default help mode to 'options' and update error help message #5212

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/_clisettings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Setting name|Definition|Default value
`csvQuotedEmpty`|Quote empty strings and overrides quoted_string on empty strings when defined|`false`
`disableTelemetry`|Disables sending of telemetry data|`false`
`errorOutput`|Defines if errors should be written to `stdout` or `stderr`|`stderr`
`helpMode`|Defines what part of command's help to display. Allowed values are `options`, `examples`, `remarks`, `response`, `full`|`full`
`helpMode`|Defines what part of command's help to display. Allowed values are `options`, `examples`, `remarks`, `response`, `full`|`options`
`output`|Defines the default output when issuing a command. Allowed values are `json`, `text`, `csv`, `md`, `none`|`json`
`printErrorsAsPlainText`|When output mode is set to `json`, print error messages as plain-text rather than JSON|`true`
`prompt`|Prompts for missing values in required options and enables interactive selection when multiple values are available for a command that requires a specific value to be retrieved.|`false`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/cmd/_global.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```md definition-list
`-h, --help [help]`
: Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are `options`, `examples`, `remarks`, `response`, `full`. Default is `full`.
: Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are `options`, `examples`, `remarks`, `response`, `full`. Default is `options`.

`--query [query]`
: JMESPath query string. See [http://jmespath.org/](http://jmespath.org/) for more information and examples.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/Cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Cli {
private optionsFromArgs: { options: minimist.ParsedArgs } | undefined;
public commandsFolder: string = '';
private static instance: Cli;
private static defaultHelpMode = 'full';
private static defaultHelpMode = 'options';
public static helpModes: string[] = ['options', 'examples', 'remarks', 'response', 'full'];
public spinner = ora('Running command...');

Expand Down