Skip to content

Commit

Permalink
Update CompletionOptions documentation to struct doc for accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
hoshsadiq committed Jan 3, 2023
1 parent ff91ef2 commit b7ff44c
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions site/content/completions/completion.md
Expand Up @@ -24,24 +24,13 @@ Zulu's completion scripts provide the following features:
Zulu provides a few options for the default `completion` command. To configure such options you must set
the `CompletionOptions` field on the *root* command.

To tell Zulu *not* to provide the default `completion` command:
```
rootCmd.CompletionOptions.DisableDefaultCmd = true
```

To tell Zulu *not* to provide the user with the `--no-descriptions` flag to the completion sub-commands:
```
rootCmd.CompletionOptions.DisableNoDescFlag = true
```

To tell Zulu to completely disable descriptions for completions:
```
rootCmd.CompletionOptions.DisableDescriptions = true
```
Please look at the documentation for the [`CompletionOptions](https://pkg.go.dev/github.com/zulucmd/zulu#CompletionOptions) struct to see what can be configured.

## Customizing completions

The generated completion scripts will automatically handle completing commands and flags. However, you can make your completions much more powerful by providing information to complete your program's nouns and flag values.
The generated completion scripts will automatically handle completing commands and flags.
However, you can make your completions much more powerful by providing information to
complete your program's nouns and flag values.

### Completion of nouns

Expand Down

0 comments on commit b7ff44c

Please sign in to comment.