From 7b08aa78e4ede4c54fda6cd9917bb62e18d0d634 Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 2 Jan 2018 16:29:43 -0600 Subject: Shortcut for most recent container It is desirable to have a shortcut for the most recently created container. We can now use "**latest" to represent the most recent container instead of its container ID or name. For example: Signed-off-by: baude Closes: #179 Approved by: baude --- docs/podman-attach.1.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/podman-attach.1.md') diff --git a/docs/podman-attach.1.md b/docs/podman-attach.1.md index 4d8b803c8..64163b340 100644 --- a/docs/podman-attach.1.md +++ b/docs/podman-attach.1.md @@ -20,6 +20,10 @@ sequence is CTRL-p CTRL-q. You configure the key sequence using the --detach-key Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. +**--latest, -l** +Instead of providing the container name or ID, use the last created container. If you use methods other than Podman +to run containers such as CRI-O, the last started container could be from either of those methods. + **--no-stdin** Do not attach STDIN. The default is false. @@ -30,6 +34,10 @@ podman attach foobar [root@localhost /]# ``` ``` +podman attach --latest +[root@localhost /]# +``` +``` podman attach 1234 [root@localhost /]# ``` -- cgit v1.2.3-54-g00ecf