Skip to content

Commit

Permalink
Merge pull request #3986 from AkihiroSuda/docker-container-remove
Browse files Browse the repository at this point in the history
rm: allow `docker container remove` as an alias
  • Loading branch information
thaJeztah authored Jan 30, 2023
2 parents 0288f7f + 9b54d86 commit 4a500f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cli/command/container/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ func NewRmCommand(dockerCli command.Cli) *cobra.Command {
var opts rmOptions

cmd := &cobra.Command{
Use: "rm [OPTIONS] CONTAINER [CONTAINER...]",
Short: "Remove one or more containers",
Args: cli.RequiresMinArgs(1),
Use: "rm [OPTIONS] CONTAINER [CONTAINER...]",
Aliases: []string{"remove"},
Short: "Remove one or more containers",
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.containers = args
return runRm(dockerCli, &opts)
},
Annotations: map[string]string{
"aliases": "docker container rm, docker rm",
"aliases": "docker container rm, docker container remove, docker rm",
},
ValidArgsFunction: completion.ContainerNames(dockerCli, true),
}
Expand Down

0 comments on commit 4a500f6

Please sign in to comment.