Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f4d1c85

Browse files
committed
remove completion flag
Signed-off-by: Guillaume Lours <[email protected]>
1 parent c422c3c commit f4d1c85

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ A tool to build and manage Docker Applications.
353353

354354
Commands:
355355
bundle Create a CNAB invocation image and `bundle.json` for the application
356-
completion Generates completion scripts for the specified shell (bash or zsh)
357356
init Initialize Docker Application definition
358357
inspect Shows metadata, parameters and a summary of the Compose file for a given application
359358
install Install an application

internal/commands/root.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
)
1818

1919
var (
20-
completion string
2120
showVersion bool
2221
)
2322

@@ -34,17 +33,6 @@ func NewRootCmd(use string, dockerCli command.Cli) *cobra.Command {
3433
return nil
3534
}
3635

37-
switch completion {
38-
case "bash":
39-
return cmd.GenBashCompletion(dockerCli.Out())
40-
case "zsh":
41-
return cmd.GenZshCompletion(dockerCli.Out())
42-
default:
43-
if completion != "" {
44-
return fmt.Errorf("%q is not a supported shell\nSee 'docker app --help'", completion)
45-
}
46-
}
47-
4836
if len(args) != 0 {
4937
return fmt.Errorf("%q is not a docker app command\nSee 'docker app --help'", args[0])
5038
}
@@ -54,12 +42,6 @@ func NewRootCmd(use string, dockerCli command.Cli) *cobra.Command {
5442
}
5543
addCommands(cmd, dockerCli)
5644

57-
cmd.Flags().StringVar(&completion, "completion", "", "Generates completion scripts for the specified shell (bash or zsh)")
58-
if err := cmd.Flags().MarkHidden("completion"); err != nil {
59-
fmt.Fprintf(os.Stderr, "Failed to register command line options: %v", err.Error()) //nolint:errcheck
60-
return nil
61-
}
62-
6345
cmd.Flags().BoolVar(&showVersion, "version", false, "Print version information")
6446
return cmd
6547
}

0 commit comments

Comments
 (0)