(longName: string, opt: Option)
| 132 | |
| 133 | console.log(`${ROW_INDENT}${synopsis.padEnd(OPTION_COLUMN_WIDTH)}${descriptionLines[0] ?? ''}`); |
| 134 | for (let i = 1; i < descriptionLines.length; i++) { |
| 135 | console.log(`${OPTION_DESCRIPTION_PAD}${descriptionLines[i]}`); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | function buildCommandSynopsisOptionColumn(longName: string, opt: Option): string { |
| 140 | let spec = opt.short ? `-${opt.short}, --${longName}` : `--${longName}`; |
| 141 | if (opt.type === 'string') { |
| 142 | const meta = getOptionVariableName(longName); |
| 143 | spec += ` ${meta}`; |
| 144 | if (opt.multiple) { |
| 145 | spec += '...'; |
| 146 | } |
| 147 | } |
no test coverage detected