From 808644533f008b4763f86a4b4fe69800e3d05e12 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Sat, 24 Mar 2018 09:31:56 +0000 Subject: [PATCH] Don't color the whitespace in --display=short --- src/process.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/process.ml b/src/process.ml index 3a6ae0e4..a4dce485 100644 --- a/src/process.ml +++ b/src/process.ml @@ -284,8 +284,10 @@ let run_internal ?dir ?(stdout_to=Terminal) ?(stderr_to=Terminal) ?env ~purpose "@{Warning@}: Command [@{%d@}] exited with code %d, \ but I'm ignoring it, hope that's OK.\n" id n end else if output <> "" || - (display = Short && purpose <> Internal_job) then - print "@{%12s@} %a\n%s" progname Fancy.pp_purpose purpose output; + (display = Short && purpose <> Internal_job) then begin + let pad = String.make (max 0 (12 - String.length progname)) ' ' in + print "%s@{%s@} %a\n%s" pad progname Fancy.pp_purpose purpose output + end; n | WEXITED n -> if display = Verbose then