Corrected detach man pages and code comments

* Updated documentation to match code

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce 2019-03-13 14:16:37 -07:00
parent 22fc5a3e57
commit f29a765573
6 changed files with 9 additions and 11 deletions

View File

@ -226,7 +226,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
) )
createFlags.String( createFlags.String(
"detach-keys", "", "detach-keys", "",
"Override 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 `_`", "Override 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 `_`",
) )
createFlags.StringSlice( createFlags.StringSlice(
"device", []string{}, "device", []string{},

View File

@ -11,13 +11,12 @@ The attach command allows you to attach to a running container using the contain
or name, either to view its ongoing output or to control it interactively. or name, either to view its ongoing output or to control it interactively.
You can detach from the container (and leave it running) using a configurable key sequence. The default You can detach from the container (and leave it running) using a configurable key sequence. The default
sequence is CTRL-p CTRL-q. You configure the key sequence using the --detach-keys option sequence is `ctrl-p,ctrl-q`. You configure the key sequence using the --detach-keys option
## OPTIONS ## OPTIONS
**--detach-keys** **--detach-keys**=""
Override the key sequence for detaching a container. Format is a single character [a-Z] or Override 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 `_`.
ctrl-[value] where [value] is one of: a-z, @, ^, [, , or _.
**--latest, -l** **--latest, -l**

View File

@ -167,13 +167,13 @@ the other shell to view a list of the running containers. You can reattach to a
detached container with **podman attach**. detached container with **podman attach**.
When attached in the tty mode, you can detach from the container (and leave it When attached in the tty mode, you can detach from the container (and leave it
running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. running) using a configurable key sequence. The default sequence is `ctrl-p,ctrl-q`.
You configure the key sequence using the **--detach-keys** option or a configuration file. You configure the key sequence using the **--detach-keys** option or a configuration file.
See **config-json(5)** for documentation on using a configuration file. See **config-json(5)** for documentation on using a configuration file.
**--detach-keys**="" **--detach-keys**=""
Override 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 `_`. Override 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 `_`.
**--device**=[] **--device**=[]

View File

@ -173,7 +173,7 @@ the other shell to view a list of the running containers. You can reattach to a
detached container with **podman attach**. detached container with **podman attach**.
When attached in the tty mode, you can detach from the container (and leave it When attached in the tty mode, you can detach from the container (and leave it
running) using a configurable key sequence. The default sequence is `CTRL-p CTRL-q`. running) using a configurable key sequence. The default sequence is `ctrl-p,ctrl-q`.
You configure the key sequence using the **--detach-keys** option or a configuration file. You configure the key sequence using the **--detach-keys** option or a configuration file.
See **config-json(5)** for documentation on using a configuration file. See **config-json(5)** for documentation on using a configuration file.

View File

@ -21,8 +21,7 @@ starting multiple containers.
**--detach-keys** **--detach-keys**
Override the key sequence for detaching a container. Format is a single character [a-Z] or Override 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 `_`.
ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _.
**--interactive, -i** **--interactive, -i**

View File

@ -93,7 +93,7 @@ var ErrDetach = errors.New("detached from container")
// CopyDetachable is similar to io.Copy but support a detach key sequence to break out. // CopyDetachable is similar to io.Copy but support a detach key sequence to break out.
func CopyDetachable(dst io.Writer, src io.Reader, keys []byte) (written int64, err error) { func CopyDetachable(dst io.Writer, src io.Reader, keys []byte) (written int64, err error) {
if len(keys) == 0 { if len(keys) == 0 {
// Default keys : ctrl-p ctrl-q // Default keys : ctrl-p,ctrl-q
keys = []byte{16, 17} keys = []byte{16, 17}
} }