kompose/vendor/github.com/spf13/cobra/powershell_completions.md
Hang Yan 525b68f027
Go mod (#1305)
* Use go mod instead of glide
* Add `--with-kompose-annotation` flag to allow us to switch it off for tests
* Remove hostpid support (since the newest sdk does not support it)
* Create new test script and fixtures
* Remove replicationcontroller support
2020-08-07 17:25:52 +08:00

771 B

Generating PowerShell Completions For Your Own cobra.Command

Cobra can generate PowerShell completion scripts. Users need PowerShell version 5.0 or above, which comes with Windows 10 and can be downloaded separately for Windows 7 or 8.1. They can then write the completions to a file and source this file from their PowerShell profile, which is referenced by the $Profile environment variable. See Get-Help about_Profiles for more info about PowerShell profiles.

What's supported

  • Completion for subcommands using their .Short description
  • Completion for non-hidden flags using their .Name and .Shorthand

What's not yet supported

  • Command aliases
  • Required, filename or custom flags (they will work like normal flags)
  • Custom completion scripts