diff --git a/api/client/commands.go b/api/client/commands.go index df2125f5f3..99ec909ba5 100644 --- a/api/client/commands.go +++ b/api/client/commands.go @@ -1511,6 +1511,7 @@ func (cli *DockerCli) CmdPs(args ...string) error { outCommand = out.Get("Command") ports = engine.NewTable("", 0) ) + outCommand = strconv.Quote(outCommand) if !*noTrunc { outCommand = utils.Trunc(outCommand, 20) }