@fiscalmindset/blindfold 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -2
- package/package.json +1 -1
- package/src/help.ts +7 -2
package/dist/cli.mjs
CHANGED
|
@@ -1703,8 +1703,12 @@ function renderMainHelp() {
|
|
|
1703
1703
|
const dl = wrapText(cmd.summary, descW);
|
|
1704
1704
|
lines.push(pad(c.bold(c.cyan(cmd.name)), nameW) + " " + (dl[0] ?? ""));
|
|
1705
1705
|
for (let i = 1; i < dl.length; i++) lines.push(pad("", nameW) + " " + (dl[i] ?? ""));
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1706
|
+
const gutter = pad("", nameW) + " ";
|
|
1707
|
+
if (cmd.usage) {
|
|
1708
|
+
lines.push(gutter + c.gray(pad("usage", 5)) + " " + c.cyan(fit(`blindfold ${cmd.name} ${cmd.usage}`, descW - 6)));
|
|
1709
|
+
}
|
|
1710
|
+
const ex = fit(cmd.examples?.[0] ?? `blindfold ${cmd.name}`, descW - 6);
|
|
1711
|
+
lines.push(gutter + c.gray(pad("e.g.", 5)) + " " + c.green(ex));
|
|
1708
1712
|
}
|
|
1709
1713
|
out.push(boxLines(group, lines));
|
|
1710
1714
|
out.push("");
|
package/package.json
CHANGED
package/src/help.ts
CHANGED
|
@@ -215,9 +215,14 @@ export function renderMainHelp(): string {
|
|
|
215
215
|
// command name (bright) + summary
|
|
216
216
|
lines.push(pad(c.bold(c.cyan(cmd.name)), nameW) + " " + (dl[0] ?? ""));
|
|
217
217
|
for (let i = 1; i < dl.length; i++) lines.push(pad("", nameW) + " " + (dl[i] ?? ""));
|
|
218
|
+
const gutter = pad("", nameW) + " ";
|
|
219
|
+
// the shape — with <placeholders> — so you learn the pattern (only if it takes args)
|
|
220
|
+
if (cmd.usage) {
|
|
221
|
+
lines.push(gutter + c.gray(pad("usage", 5)) + " " + c.cyan(fit(`blindfold ${cmd.name} ${cmd.usage}`, descW - 6)));
|
|
222
|
+
}
|
|
218
223
|
// one concrete example — the fastest way to "get" the command
|
|
219
|
-
const ex = fit(cmd.examples?.[0] ?? `blindfold ${cmd.name}`, descW -
|
|
220
|
-
lines.push(
|
|
224
|
+
const ex = fit(cmd.examples?.[0] ?? `blindfold ${cmd.name}`, descW - 6);
|
|
225
|
+
lines.push(gutter + c.gray(pad("e.g.", 5)) + " " + c.green(ex));
|
|
221
226
|
}
|
|
222
227
|
out.push(boxLines(group, lines));
|
|
223
228
|
out.push("");
|