summaryrefslogtreecommitdiff
path: root/cmd/podman/main_local.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-01-08 13:20:36 -0700
committerEd Santiago <santiago@redhat.com>2020-01-08 14:24:43 -0700
commit3b2aa033c8f6abdf93e25f9e7bed7dd596fcfe34 (patch)
treee2eb3d04745cf31ef3d0c4b5a59fe382c8dcc333 /cmd/podman/main_local.go
parentc99b413abbc74f6f7e126d8bca58f44a3fcd9c2d (diff)
downloadpodman-3b2aa033c8f6abdf93e25f9e7bed7dd596fcfe34.tar.gz
podman-3b2aa033c8f6abdf93e25f9e7bed7dd596fcfe34.tar.bz2
podman-3b2aa033c8f6abdf93e25f9e7bed7dd596fcfe34.zip
Usage messages: show possible option values
...in a consistent manner: ("a"|"b"|"c") This makes it possible (and easy) for zsh completion to pick those out of the --help messages and offer them as values when user hits TAB. I chose this format because it's an already-existing convention in cmd/podman/common.go. Also: removed two duplicate "default: x" messages (Cobra displays those automatically where a non-null default is specified). Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'cmd/podman/main_local.go')
-rw-r--r--cmd/podman/main_local.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/main_local.go b/cmd/podman/main_local.go
index bc46e4652..e5b87754b 100644
--- a/cmd/podman/main_local.go
+++ b/cmd/podman/main_local.go
@@ -33,7 +33,7 @@ const remote = false
func init() {
cgroupManager := define.SystemdCgroupsManager
- cgroupHelp := "Cgroup manager to use (cgroupfs or systemd)"
+ cgroupHelp := `Cgroup manager to use ("cgroupfs"|"systemd")`
cgroupv2, _ := cgroups.IsCgroup2UnifiedMode()
if rootless.IsRootless() && !cgroupv2 {
cgroupManager = ""
@@ -50,12 +50,12 @@ func init() {
if err := rootCmd.PersistentFlags().MarkHidden("default-mounts-file"); err != nil {
logrus.Error("unable to mark default-mounts-file flag as hidden")
}
- rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.EventsBackend, "events-backend", "", "Events backend to use")
+ rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.EventsBackend, "events-backend", "", `Events backend to use ("file"|"journald"|"none")`)
// Override default --help information of `--help` global flag
var dummyHelp bool
rootCmd.PersistentFlags().BoolVar(&dummyHelp, "help", false, "Help for podman")
rootCmd.PersistentFlags().StringSliceVar(&MainGlobalOpts.HooksDir, "hooks-dir", []string{}, "Set the OCI hooks directory path (may be set multiple times)")
- rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.LogLevel, "log-level", "error", "Log messages above specified level: debug, info, warn, error, fatal or panic")
+ rootCmd.PersistentFlags().StringVar(&MainGlobalOpts.LogLevel, "log-level", "error", `Log messages above specified level ("debug"|"info"|"warn"|"error"|"fatal"|"panic")`)
rootCmd.PersistentFlags().IntVar(&MainGlobalOpts.MaxWorks, "max-workers", 0, "The maximum number of workers for parallel operations")
if err := rootCmd.PersistentFlags().MarkHidden("max-workers"); err != nil {
logrus.Error("unable to mark max-workers flag as hidden")