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

Improve documentation #3749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion pkg/kubectl-argo-rollouts/cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ func NewCmdCompletion(o *options.ArgoRolloutsOptions) *cobra.Command {
var cmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
Long: `To load completions:
Long: `Loading completion is a two step process:
First you need to ensure that the kubectl-argo-rollouts can be completed, depending on your shell you can do this:

Bash:

Expand Down Expand Up @@ -47,6 +48,12 @@ func NewCmdCompletion(o *options.ArgoRolloutsOptions) *cobra.Command {
# To load completions for every new session, run:
PS> yourprogram completion powershell > yourprogram.ps1
# and source this file from your PowerShell profile.

Secondly in order to support completion with kubectl you need to create a file in your path called: kubectl_complete-argo-rollouts with:
Bash:
#!/usr/bin/env bash
args=("$@")
kubectl-argo-rollouts __complete "$@"
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Expand Down
Loading