diff --git a/api/client/commands.go b/api/client/commands.go index 0cdf3f1acb..8f76b6e26a 100644 --- a/api/client/commands.go +++ b/api/client/commands.go @@ -1476,6 +1476,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) }