-
Notifications
You must be signed in to change notification settings - Fork 119
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
interpreting space after parameter as boolean use #380
Comments
Additionally, the short version acts in a similar way:
In this case too a space after the parameter is considered to signal boolean use. |
@smhg today I do not believe there is a way to differentiate between an argument set with I could imagine us adding some additional meta information like this to the object returned after parsing. |
@bcoe thank you for your reply! |
This is probably not an issue, but rather a question:
The existing translation tool
xgettext
(part of GNU gettext-tools) allows these different usages of their--keyword
parameter:xgettext --keyword=foo --keyword=bar source.js
Scans source.js for
foo
,bar
and the default keywords (_
,gettext
,... for JavaScript files).xgettext --keyword=foo --keyword=bar --keyword source.js
Scans source.js for only
foo
andbar
, ignoring the default keywords.The
--keyword
parameter is acting both as a boolean and as an array of strings. The use of an equal-sign is mandatory when specifying a string value.Is something similar possible with yargs?
The text was updated successfully, but these errors were encountered: