Skip to content

Commit

Permalink
add unload as an alias
Browse files Browse the repository at this point in the history
Signed-off-by: Tharun <[email protected]>
  • Loading branch information
tharun208 committed Mar 26, 2021
1 parent 3503c3e commit 0922744
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
13 changes: 9 additions & 4 deletions cmd/minikube/cmd/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,15 @@ var loadImageCmd = &cobra.Command{
}

var removeImageCmd = &cobra.Command{
Use: "rm IMAGE [IMAGE...]",
Short: "Remove one or more images",
Long: "Remove a image from minikube",
Example: "minikube image rm image busybox",
Use: "rm IMAGE [IMAGE...]",
Short: "Remove one or more images",
Long: "Remove a image from minikube",
Example: `
$ minikube image rm image busybox
$ minikube image unload image busybox
`,
Aliases: []string{"unload"},
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
exit.Message(reason.Usage, "Please provide an image to remove via <minikube image rm IMAGE_NAME>")
Expand Down
5 changes: 5 additions & 0 deletions pkg/generate/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
buf.WriteString(fmt.Sprintf("```shell\n%s\n```\n\n", cmd.UseLine()))
}

if len(cmd.Aliases) > 0 {
buf.WriteString("### Aliases\n\n")
buf.WriteString(fmt.Sprintf("%s\n\n", cmd.Aliases))
}

if len(cmd.Example) > 0 {
buf.WriteString("### Examples\n\n")
buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example))
Expand Down
10 changes: 9 additions & 1 deletion site/content/en/docs/commands/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,18 @@ Remove a image from minikube
minikube image rm IMAGE [IMAGE...] [flags]
```

### Aliases

[unload]

### Examples

```
minikube image rm image busybox
$ minikube image rm image busybox
$ minikube image unload image busybox
```

### Options inherited from parent commands
Expand Down

0 comments on commit 0922744

Please sign in to comment.