summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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