Skip to content

Commit

Permalink
replacing deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jk1484 committed Aug 28, 2023
1 parent ad59bae commit 957c17a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/completions.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

import (
"github.com/spf13/cobra"
"os"

"github.com/spf13/cobra"
)

// CommandLineCompletionCommand allows to generate convenience scripts for using the piper cli in a shell.
Expand Down Expand Up @@ -44,7 +45,7 @@ $ piper completion fish > ~/.config/fish/completions/piper.fish
`,
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
Expand Down

0 comments on commit 957c17a

Please sign in to comment.