(str)
| 580 | return this.styleOptionText(str); |
| 581 | } |
| 582 | styleSubcommandTerm(str) { |
| 583 | // This is very like usage with lots of parts! Assume default string which is formed like: |
| 584 | // subcommand [options] <foo> [bar] |
| 585 | return str |
| 586 | .split(' ') |
| 587 | .map((word) => { |
| 588 | if (word === '[options]') return this.styleOptionText(word); |
| 589 | if (word[0] === '[' || word[0] === '<') |
| 590 | return this.styleArgumentText(word); |
| 591 | return this.styleSubcommandText(word); // Restrict to initial words? |
| 592 | }) |
| 593 | .join(' '); |
| 594 | } |
| 595 | styleArgumentTerm(str) { |
| 596 | return this.styleArgumentText(str); |
| 597 | } |
no test coverage detected