Merge pull request #3986 from AkihiroSuda/docker-container-remove

rm: allow `docker container remove` as an alias
This commit is contained in:
Sebastiaan van Stijn 2023-01-30 10:56:34 +01:00 committed by GitHub
commit 4a500f690f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -28,6 +28,7 @@ func NewRmCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
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 {
@ -35,7 +36,7 @@ func NewRmCommand(dockerCli command.Cli) *cobra.Command {
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),
}