提交 e37f8bc1 编写于 作者: T Tharun

add unload as an alias and fixed parent command usage

Signed-off-by: NTharun <rajendrantharun@live.com>
上级 3503c3ea
......@@ -33,9 +33,8 @@ import (
// imageCmd represents the image command
var imageCmd = &cobra.Command{
Use: "image",
Short: "Load a local image into minikube",
Long: "Load a local image into minikube",
Use: "image COMMAND",
Short: "Manage images",
}
var (
......@@ -126,10 +125,14 @@ 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",
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>")
......
......@@ -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))
......
---
title: "image"
description: >
Load a local image into minikube
Manage images
---
## minikube image
Load a local image into minikube
Manage images
### Synopsis
Load a local image into minikube
Manage images
### Options inherited from parent commands
......@@ -124,16 +124,24 @@ Remove one or more images
### Synopsis
Remove a image from minikube
Remove one or more images
```shell
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册