Search code examples
javascriptnode.jscommand-line-interfacevorpal.js

Change App name in »exit« help text of vorpal app


When entering help vorpal says:

exit [options]   Exits instance of Vorpal.

Is it possible to override the word Vorpal? Because users might not know what Vorpal is and might be confused.


Solution

  • You can use the find method to find the existing exit command, and then use the description method to edit its help description:

    const exit = vorpal.find('exit');
    if (exit) {
      exit.description('My custom help description');
    }