Skip to content

Commit ad000c7

Browse files
committed
CLI: separate every root command-tree group with a blank line
Use uniform blank-line separation between all top-level groups rather than only around wrapped ones, for a consistent, easy-to-scan rhythm.
1 parent 507c596 commit ad000c7

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

packages/cli/src/help-tree.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,11 @@ function compactSection(cmd: Command, helper: Help): string {
105105
return [label + wrapped[0], ...wrapped.slice(1).map((w) => ' '.repeat(valueCol) + w)];
106106
});
107107

108-
// Fence off wrapped (multi-line) groups with a blank line so their
109-
// continuation lines don't read as separate entries. Single-line groups stay
110-
// tight against each other.
108+
// Separate every group with a blank line so each reads as one unit and the
109+
// wrapped groups' continuation lines never look like separate entries.
111110
const lines: string[] = [];
112111
blocks.forEach((block, i) => {
113-
const wraps = block.length > 1;
114-
const prevWraps = i > 0 && blocks[i - 1].length > 1;
115-
if (i > 0 && (wraps || prevWraps)) {
112+
if (i > 0) {
116113
lines.push('');
117114
}
118115
lines.push(...block);

0 commit comments

Comments
 (0)