summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/attach.go3
-rw-r--r--cmd/podman/common.go6
-rw-r--r--cmd/podman/exec.go3
-rw-r--r--cmd/podman/start.go3
4 files changed, 14 insertions, 1 deletions
diff --git a/cmd/podman/attach.go b/cmd/podman/attach.go
index eeedea8c8..7d32c57af 100644
--- a/cmd/podman/attach.go
+++ b/cmd/podman/attach.go
@@ -33,6 +33,9 @@ func init() {
attachCommand.SetUsageTemplate(UsageTemplate())
flags := attachCommand.Flags()
flags.StringVar(&attachCommand.DetachKeys, "detach-keys", define.DefaultDetachKeys, "Select the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-z`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`")
+ // Clear the default, the value specified in the config file should have the
+ // priority
+ attachCommand.DetachKeys = ""
flags.BoolVar(&attachCommand.NoStdin, "no-stdin", false, "Do not attach STDIN. The default is false")
flags.BoolVar(&attachCommand.SigProxy, "sig-proxy", true, "Proxy received signals to the process")
flags.BoolVarP(&attachCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index 442823d2d..69365201e 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -208,10 +208,14 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
"detach", "d", false,
"Run container in background and print container ID",
)
- createFlags.String(
+ detachKeys := createFlags.String(
"detach-keys", define.DefaultDetachKeys,
"Override the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-z`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`",
)
+ // Clear the default, the value specified in the config file should have the
+ // priority
+ *detachKeys = ""
+
createFlags.StringSlice(
"device", []string{},
"Add a host device to the container (default [])",
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go
index afa701897..8dcec24ce 100644
--- a/cmd/podman/exec.go
+++ b/cmd/podman/exec.go
@@ -36,6 +36,9 @@ func init() {
flags := execCommand.Flags()
flags.SetInterspersed(false)
flags.StringVar(&execCommand.DetachKeys, "detach-keys", define.DefaultDetachKeys, "Select the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _")
+ // Clear the default, the value specified in the config file should have the
+ // priority
+ execCommand.DetachKeys = ""
flags.StringArrayVarP(&execCommand.Env, "env", "e", []string{}, "Set environment variables")
flags.BoolVarP(&execCommand.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")
flags.BoolVarP(&execCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
diff --git a/cmd/podman/start.go b/cmd/podman/start.go
index d4b4534bb..a070cd18d 100644
--- a/cmd/podman/start.go
+++ b/cmd/podman/start.go
@@ -35,6 +35,9 @@ func init() {
startCommand.SetUsageTemplate(UsageTemplate())
flags := startCommand.Flags()
flags.BoolVarP(&startCommand.Attach, "attach", "a", false, "Attach container's STDOUT and STDERR")
+ // Clear the default, the value specified in the config file should have the
+ // priority
+ startCommand.DetachKeys = ""
flags.StringVar(&startCommand.DetachKeys, "detach-keys", define.DefaultDetachKeys, "Select the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-z`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`")
flags.BoolVarP(&startCommand.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")
flags.BoolVarP(&startCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")