Skip to content

Commit c78499e

Browse files
committed
cmd/completion: Use V2 of Bash completion in Cobra
V1 is legacy since v1.2.0[0]. [0] https://github.com/spf13/cobra/releases/tag/v1.2.0 Fallout from containers#840 containers#1055
1 parent 3c0e092 commit c78499e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/completion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var completionCmd = &cobra.Command{
1818
Run: func(cmd *cobra.Command, args []string) {
1919
switch args[0] {
2020
case "bash":
21-
if err := cmd.Root().GenBashCompletion(os.Stdout); err != nil {
21+
if err := cmd.Root().GenBashCompletionV2(os.Stdout, true); err != nil {
2222
fmt.Fprintf(os.Stderr, "Error: %v", err)
2323
}
2424
case "zsh":

0 commit comments

Comments
 (0)