node-getopt
node-getopt copied to clipboard
Access to command name
It would be helpful if I could access the command-name (the basename of process.argv[1]) from the opts structure, so I can use it in other error messages. Something like:
opt.parseSystem();
if (!parseFile(opt.argv[0])) {
console.error(`${opt.command}: could not parse file ${opt.argv[0]}`);
process.exit(1);
}
By the way, can I say that I really appreciate this library, and the way it doesn't try to take over my whole application, just does what I need it to simply and directly. I hope my filing two feature-requests today doesn't come across as ungrateful :-)