diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-11-04 14:37:14 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-11-05 14:10:43 -0500 |
commit | 7c623bd41ff3d53412531343a94e4fa5fead759f (patch) | |
tree | cc4b904f5a5c2fcfb5388c502125f5416e821ab2 /cmd/podman/attach.go | |
parent | a904e21cf0213185fd115683dc2adc4baeff922a (diff) | |
download | podman-7c623bd41ff3d53412531343a94e4fa5fead759f.tar.gz podman-7c623bd41ff3d53412531343a94e4fa5fead759f.tar.bz2 podman-7c623bd41ff3d53412531343a94e4fa5fead759f.zip |
Allow users to disable detach keys
If user specifies --detach-keys="", this will disable the feature.
Adding define.DefaultDetachKeys to help screen to help identify detach keys.
Updated man pages with additonal information.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/attach.go')
-rw-r--r-- | cmd/podman/attach.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/attach.go b/cmd/podman/attach.go index b78633ed6..b03673f29 100644 --- a/cmd/podman/attach.go +++ b/cmd/podman/attach.go @@ -2,6 +2,7 @@ package main import ( "github.com/containers/libpod/cmd/podman/cliconfig" + "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/adapter" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -31,7 +32,7 @@ func init() { attachCommand.SetHelpTemplate(HelpTemplate()) attachCommand.SetUsageTemplate(UsageTemplate()) flags := attachCommand.Flags() - flags.StringVar(&attachCommand.DetachKeys, "detach-keys", "", "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 `_`") + 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 `_`") 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") |