From b3dd42a7977bef2ea3408857200edde61abf25b7 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Sun, 5 Jul 2020 15:39:34 +0200 Subject: podman ps truncate the command With a long create command the output from ps is basically unreadable. This is a regression that was introduced with Podman 2.0. Signed-off-by: Paul Holzinger --- cmd/podman/containers/ps.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmd/podman') diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index d10cda609..188a8c03b 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -309,7 +309,13 @@ func (l psReporter) Status() string { // Command returns the container command in string format func (l psReporter) Command() string { - return strings.Join(l.ListContainer.Command, " ") + command := strings.Join(l.ListContainer.Command, " ") + if !noTrunc { + if len(command) > 17 { + return command[0:17] + "..." + } + } + return command } // Size returns the rootfs and virtual sizes in human duration in -- cgit v1.2.3-54-g00ecf