Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to command name #18

Open
MikeTaylor opened this issue May 17, 2018 · 1 comment
Open

Access to command name #18

MikeTaylor opened this issue May 17, 2018 · 1 comment

Comments

@MikeTaylor
Copy link

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);
}
@MikeTaylor
Copy link
Author

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant