Summary
When display.guide is set to false, the guide bar is correctly hidden, but @clack/prompts' default spacing: 1 still prepends a blank line before each log.* call. This creates unwanted whitespace — especially noticeable at the top of command output where the first log message gets a leading blank line with no visual purpose.
Problem
resolveClackBase() maps guide, input, and output from the display config to clack options, but does not pass through spacing. There's no way to configure a global default for spacing — it must be set per-call via ctx.log.info(msg, { spacing: 0 }).
Proposal
Add a spacing property to the display config that gets forwarded to clack's base options:
cli({
display: {
guide: false,
spacing: 0, // <-- new option
},
})
This would be mapped in resolveClackBase:
function resolveClackBase(defaults) {
if (defaults === void 0) return EMPTY_CLACK_BASE;
return {
withGuide: defaults.guide,
input: defaults.input,
output: defaults.output,
spacing: defaults.spacing, // new
};
}
Workaround
Pass { spacing: 0 } to individual ctx.log.* calls:
ctx.log.info('message', { spacing: 0 })
This works but is tedious for commands that want no spacing throughout.
Summary
When
display.guideis set tofalse, the guide bar is correctly hidden, but@clack/prompts' defaultspacing: 1still prepends a blank line before eachlog.*call. This creates unwanted whitespace — especially noticeable at the top of command output where the first log message gets a leading blank line with no visual purpose.Problem
resolveClackBase()mapsguide,input, andoutputfrom the display config to clack options, but does not pass throughspacing. There's no way to configure a global default for spacing — it must be set per-call viactx.log.info(msg, { spacing: 0 }).Proposal
Add a
spacingproperty to the display config that gets forwarded to clack's base options:This would be mapped in
resolveClackBase:Workaround
Pass
{ spacing: 0 }to individualctx.log.*calls:This works but is tedious for commands that want no spacing throughout.