summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-10-30 10:12:40 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2018-10-30 10:12:40 -0500
commitdcb68d1aa24b2dd00d793f5a66f96cc5403b43c3 (patch)
tree230cc7586cf8d333680f27b915a65cf587e72a6b /cmd/podman/shared
parenteb4c2035aef32fd7f0037bbea0447205fcd29d33 (diff)
parentce24ce7c530f8fb0354d3af7b394240a3915b733 (diff)
downloadpodman-dcb68d1aa24b2dd00d793f5a66f96cc5403b43c3.tar.gz
podman-dcb68d1aa24b2dd00d793f5a66f96cc5403b43c3.tar.bz2
podman-dcb68d1aa24b2dd00d793f5a66f96cc5403b43c3.zip
Merge branch 'master' of github.com:containers/libpod into vendor
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/container.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index b847314a4..4404268d4 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -24,6 +24,7 @@ import (
const (
cidTruncLength = 12
podTruncLength = 12
+ cmdTruncLength = 17
)
// PsOptions describes the struct being formed for ps
@@ -191,9 +192,12 @@ func NewBatchContainer(ctr *libpod.Container, opts PsOptions) (PsContainerOutput
pod := ctr.PodID()
if !opts.NoTrunc {
cid = cid[0:cidTruncLength]
- if len(pod) > 12 {
+ if len(pod) > podTruncLength {
pod = pod[0:podTruncLength]
}
+ if len(command) > cmdTruncLength {
+ command = command[0:cmdTruncLength] + "..."
+ }
}
pso.ID = cid