carvel-dev / ytt

YAML templating tool that works on YAML structure instead of text
https://carvel.dev/ytt
Apache License 2.0
1.65k stars 135 forks source link

Document/Expose "completion" command in ytt #478

Closed pivotaljohn closed 2 years ago

pivotaljohn commented 3 years ago

Cobra 1.2.0 introduced a feature by which the library automatically includes a shell completion command (for bash, fish, powershell, and z-shell). docs

Dependabot generated a PR for the upgrade: #451

When that PR is merged, the feature is available: this new command (i.e. completion) is automatically added:

$ ./ytt --help
ytt performs YAML templating.

Docs: https://carvel.dev/ytt/docs/latest/
Docs for data values: https://carvel.dev/ytt/docs/latest/ytt-data-values/

Usage:
  ytt [flags]
  ytt [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  fmt         Format YAML templates
  help        Help about any command
...

👍🏻

To maximize the value the feature provides, we need to do a little work to let users know it is there:

pivotaljohn commented 3 years ago

Removed "carvel triage"; we're definitely doing this work.

aaronshurley commented 3 years ago

Categorizing this as important-soon since we think that has a high ROI (little effort, high return).

cari-lynn commented 3 years ago

One suggestion for the docs is to include that ytt completion zsh --help tell you the exact command to run. It was a bit confusing to me at first where to send the output of the command.

pivotaljohn commented 2 years ago

Completed by: