MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / buildCommandSynopsisOptionColumn

Function buildCommandSynopsisOptionColumn

cli/src/cli/help.ts:134–144  ·  view source on GitHub ↗
(longName: string, opt: Option)

Source from the content-addressed store, hash-verified

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
139function 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 }

Callers 1

printOptionManualRowFunction · 0.85

Calls 1

getOptionVariableNameFunction · 0.85

Tested by

no test coverage detected