summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-02-27 12:26:35 -0600
committerbaude <bbaude@redhat.com>2019-02-27 12:29:41 -0600
commit4a33ee2ab337b84bbfbc0045c08ac3d43073d702 (patch)
tree96dcdde8b74a0d0a2e6b04816de0f50a0009cfc8
parentfd16be5c00533e5237bfaa640e5afb4b45d29aa5 (diff)
downloadpodman-4a33ee2ab337b84bbfbc0045c08ac3d43073d702.tar.gz
podman-4a33ee2ab337b84bbfbc0045c08ac3d43073d702.tar.bz2
podman-4a33ee2ab337b84bbfbc0045c08ac3d43073d702.zip
fix up a number of misplace commands
* ps now on main command * sign is no longer on main commmand * ls, list no longer are valid main aliases for images * ls, list does work for podman image Signed-off-by: baude <bbaude@redhat.com>
-rw-r--r--cmd/podman/commands.go2
-rw-r--r--cmd/podman/image.go6
-rw-r--r--cmd/podman/images.go5
-rw-r--r--cmd/podman/main.go2
-rw-r--r--cmd/podman/ps.go7
5 files changed, 12 insertions, 10 deletions
diff --git a/cmd/podman/commands.go b/cmd/podman/commands.go
index 73e02e27a..fd36e77d5 100644
--- a/cmd/podman/commands.go
+++ b/cmd/podman/commands.go
@@ -30,7 +30,6 @@ func getMainCommands() []*cobra.Command {
_rmCommand,
_runCommand,
_searchCommand,
- _signCommand,
_startCommand,
_statsCommand,
_stopCommand,
@@ -49,7 +48,6 @@ func getMainCommands() []*cobra.Command {
// Commands that the local client implements
func getImageSubCommands() []*cobra.Command {
return []*cobra.Command{
- _loadCommand,
_signCommand,
}
}
diff --git a/cmd/podman/image.go b/cmd/podman/image.go
index 14053cb0d..aaa1866c4 100644
--- a/cmd/podman/image.go
+++ b/cmd/podman/image.go
@@ -14,6 +14,7 @@ var (
Long: imageDescription,
},
}
+ _imagesSubCommand = _imagesCommand
)
//imageSubCommands are implemented both in local and remote clients
@@ -21,7 +22,6 @@ var imageSubCommands = []*cobra.Command{
_buildCommand,
_historyCommand,
_imageExistsCommand,
- _imagesCommand,
_importCommand,
_inspectCommand,
_loadCommand,
@@ -37,4 +37,8 @@ func init() {
imageCommand.SetUsageTemplate(UsageTemplate())
imageCommand.AddCommand(imageSubCommands...)
imageCommand.AddCommand(getImageSubCommands()...)
+
+ _imagesSubCommand.Aliases = []string{"ls", "list"}
+ imageCommand.AddCommand(&_imagesSubCommand)
+
}
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 6e82195a9..c7f80c34a 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -87,7 +87,7 @@ var (
imagesCommand cliconfig.ImagesValues
imagesDescription = "lists locally stored images."
- _imagesCommand = &cobra.Command{
+ _imagesCommand = cobra.Command{
Use: "images",
Short: "List images in local storage",
Long: imagesDescription,
@@ -103,8 +103,9 @@ var (
)
func init() {
- imagesCommand.Command = _imagesCommand
+ imagesCommand.Command = &_imagesCommand
imagesCommand.SetUsageTemplate(UsageTemplate())
+
flags := imagesCommand.Flags()
flags.BoolVarP(&imagesCommand.All, "all", "a", false, "Show all images (default hides intermediate images)")
flags.BoolVar(&imagesCommand.Digests, "digests", false, "Show digests")
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 19bdb40d6..d36270853 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -38,7 +38,7 @@ var mainCommands = []*cobra.Command{
_buildCommand,
_exportCommand,
_historyCommand,
- _imagesCommand,
+ &_imagesCommand,
_importCommand,
_infoCommand,
_inspectCommand,
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 9c165b836..3bc4f0b08 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -158,10 +158,9 @@ var (
psCommand cliconfig.PsValues
psDescription = "Prints out information about the containers"
_psCommand = &cobra.Command{
- Use: "list",
- Aliases: []string{"ls", "ps"},
- Short: "List containers",
- Long: psDescription,
+ Use: "ps",
+ Short: "List containers",
+ Long: psDescription,
RunE: func(cmd *cobra.Command, args []string) error {
psCommand.InputArgs = args
psCommand.GlobalFlags = MainGlobalOpts