From 5fb8384e2ff4528db9facca3e0075ba995156354 Mon Sep 17 00:00:00 2001 From: Daniel Voros <97877553+danielvoros-form3@users.noreply.github.com> Date: Tue, 19 Jul 2022 11:38:35 +0200 Subject: [PATCH] fix: bash-completion to stdout + typos in usage (#55) --- README.md | 2 +- main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e07b07..998a50b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Usage: Available Commands: analysis Analyze RBAC permissions and highlight overly permissive principals, risky permissions, etc. auditgen Generate RBAC policy from Kubernetes audit events - bash-completion Generate bash completion. source < (rbac-too bash-completion) + bash-completion Generate bash completion. source <(rbac-tool bash-completion) generate Generate Role or ClusterRole and reduce the use of wildcards help Help about any command lookup RBAC Lookup by subject (user/group/serviceaccount) name diff --git a/main.go b/main.go index 9d59abc..4c59bae 100644 --- a/main.go +++ b/main.go @@ -20,12 +20,12 @@ func RbacGenCmd() *cobra.Command { var genBashCompletionCmd = &cobra.Command{ Use: "bash-completion", - Short: "Generate bash completion. source < (rbac-too bash-completion)", - Long: "Generate bash completion. source < (rbac-too bash-completion)", + Short: "Generate bash completion. source <(rbac-tool bash-completion)", + Long: "Generate bash completion. source <(rbac-tool bash-completion)", Run: func(cmd *cobra.Command, args []string) { out := new(bytes.Buffer) _ = rootCmd.GenBashCompletion(out) - println(out.String()) + fmt.Println(out.String()) }, }