mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
Merge pull request #2471 from baude/clifixups
fix up a number of misplace commands
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
||||
}
|
||||
|
@ -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")
|
||||
|
@ -38,7 +38,7 @@ var mainCommands = []*cobra.Command{
|
||||
_buildCommand,
|
||||
_exportCommand,
|
||||
_historyCommand,
|
||||
_imagesCommand,
|
||||
&_imagesCommand,
|
||||
_importCommand,
|
||||
_infoCommand,
|
||||
_inspectCommand,
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user