aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/image.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-01 12:35:59 -0800
committerGitHub <noreply@github.com>2019-03-01 12:35:59 -0800
commit467b677451840dbc71853784f3a9b86d2736e30d (patch)
tree42f49c29823269ae6ba708cc8c8d57c51ce880f5 /cmd/podman/image.go
parente4746f9b4b679548d88f0ea94f73d760b2658c3c (diff)
parent4258e3832627b23927f4a77dd85d1cb78f5a2a65 (diff)
downloadpodman-467b677451840dbc71853784f3a9b86d2736e30d.tar.gz
podman-467b677451840dbc71853784f3a9b86d2736e30d.tar.bz2
podman-467b677451840dbc71853784f3a9b86d2736e30d.zip
Merge pull request #2482 from edsantiago/podman_image_rm
Fix usage messages for podman image list, rm
Diffstat (limited to 'cmd/podman/image.go')
-rw-r--r--cmd/podman/image.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/podman/image.go b/cmd/podman/image.go
index b5c1c3ccf..0777425eb 100644
--- a/cmd/podman/image.go
+++ b/cmd/podman/image.go
@@ -1,6 +1,8 @@
package main
import (
+ "strings"
+
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/spf13/cobra"
)
@@ -39,11 +41,13 @@ func init() {
imageCommand.AddCommand(getImageSubCommands()...)
// Setup of "images" to appear as "list"
- _imagesSubCommand.Use = "list"
+ _imagesSubCommand.Use = strings.Replace(_imagesSubCommand.Use, "images", "list", 1)
_imagesSubCommand.Aliases = []string{"ls"}
+ _imagesSubCommand.Example = strings.Replace(_imagesSubCommand.Example, "podman images", "podman image list", -1)
imageCommand.AddCommand(&_imagesSubCommand)
- // Setup of "rmi" to appears as "rm"
- _rmSubCommand.Use = "rm"
+ // It makes no sense to keep 'podman images rmi'; just use 'rm'
+ _rmSubCommand.Use = strings.Replace(_rmSubCommand.Use, "rmi", "rm", 1)
+ _rmSubCommand.Example = strings.Replace(_rmSubCommand.Example, "podman rmi", "podman image rm", -1)
imageCommand.AddCommand(&_rmSubCommand)
}