mirror of
https://github.com/containers/podman.git
synced 2025-09-27 16:54:42 +08:00

Don't print potentially verbose help messages in case of usage errors, but print only the usage error followed by a pointer to the command's help. This aligns with Docker. ``` $ podman run -h flag needs an argument: -h See 'podman run --help'. ``` Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1379 Approved by: rhatdan
49 lines
896 B
Go
49 lines
896 B
Go
package main
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var (
|
|
subCommands = []cli.Command{
|
|
attachCommand,
|
|
cleanupCommand,
|
|
commitCommand,
|
|
createCommand,
|
|
diffCommand,
|
|
execCommand,
|
|
exportCommand,
|
|
inspectCommand,
|
|
killCommand,
|
|
logsCommand,
|
|
lsCommand,
|
|
mountCommand,
|
|
pauseCommand,
|
|
portCommand,
|
|
// pruneCommand,
|
|
refreshCommand,
|
|
restartCommand,
|
|
rmCommand,
|
|
runCommand,
|
|
startCommand,
|
|
statsCommand,
|
|
stopCommand,
|
|
topCommand,
|
|
umountCommand,
|
|
unpauseCommand,
|
|
// updateCommand,
|
|
waitCommand,
|
|
}
|
|
|
|
containerDescription = "Manage containers"
|
|
containerCommand = cli.Command{
|
|
Name: "container",
|
|
Usage: "Manage Containers",
|
|
Description: containerDescription,
|
|
ArgsUsage: "",
|
|
Subcommands: subCommands,
|
|
UseShortOptionHandling: true,
|
|
OnUsageError: usageErrorHandler,
|
|
}
|
|
)
|