Skip to content
Myr

custom-help

This file

Path

examples/custom-help

22 lines · 398 bytes

Last changed by

Switching to esm-only (#2464)John Geebefore adoptionf4bd470

History of this file

Take it

1#!/usr/bin/env node23// This example shows a simple use of addHelpText.4// This is used as an example in the README.56import { Command } from 'commander';7const program = new Command();89program.option('-f, --foo', 'enable some foo');1011program.addHelpText(12  'after',13  `1415Example call:16  $ custom-help --help`,17);1819program.parse(process.argv);2021// Try the following:22//    node custom-help --help