{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/arg/issues/51","repository_url":"https://api.github.com/repos/zeit/arg","labels_url":"https://api.github.com/repos/zeit/arg/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/zeit/arg/issues/51/comments","events_url":"https://api.github.com/repos/zeit/arg/issues/51/events","html_url":"https://github.com/zeit/arg/issues/51","id":544424135,"node_id":"MDU6SXNzdWU1NDQ0MjQxMzU=","number":51,"title":"Short args can't be used with =","user":{"login":"jaydenseric","id":1754873,"node_id":"MDQ6VXNlcjE3NTQ4NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1754873?v=4","gravatar_id":"","url":"https://api.github.com/users/jaydenseric","html_url":"https://github.com/jaydenseric","followers_url":"https://api.github.com/users/jaydenseric/followers","following_url":"https://api.github.com/users/jaydenseric/following{/other_user}","gists_url":"https://api.github.com/users/jaydenseric/gists{/gist_id}","starred_url":"https://api.github.com/users/jaydenseric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaydenseric/subscriptions","organizations_url":"https://api.github.com/users/jaydenseric/orgs","repos_url":"https://api.github.com/users/jaydenseric/repos","events_url":"https://api.github.com/users/jaydenseric/events{/privacy}","received_events_url":"https://api.github.com/users/jaydenseric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2020-01-02T02:03:14Z","updated_at":"2020-01-02T03:19:49Z","closed_at":null,"author_association":"NONE","body":"Short args can't be used with `=`. Is this intentional?\r\n\r\n```js\r\nconst arg = require('arg')\r\n\r\narg({\r\n  '-a': String\r\n})\r\n```\r\n\r\n```sh\r\nnode example.js -a=a\r\n```\r\n\r\nResults in:\r\n\r\n```\r\n                                        throw new TypeError(`Option requires argument (but was followed by another short argument): ${originalArgName}`);\r\n                                        ^\r\n\r\nTypeError: Option requires argument (but was followed by another short argument): -a\r\n    at arg (<path>/node_modules/arg/index.js:97:12)\r\n    at Object.<anonymous> (<path>/example.js:5:1)\r\n```\r\n\r\nA similar error happens for aliases:\r\n\r\n```js\r\nconst arg = require('arg')\r\n\r\narg({\r\n  '--a': String,\r\n  '-a': '--a'\r\n})\r\n```"},"comment":{"url":"https://api.github.com/repos/zeit/arg/issues/comments/570109943","html_url":"https://github.com/zeit/arg/issues/51#issuecomment-570109943","issue_url":"https://api.github.com/repos/zeit/arg/issues/51","id":570109943,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MDEwOTk0Mw==","user":{"login":"jaydenseric","id":1754873,"node_id":"MDQ6VXNlcjE3NTQ4NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1754873?v=4","gravatar_id":"","url":"https://api.github.com/users/jaydenseric","html_url":"https://github.com/jaydenseric","followers_url":"https://api.github.com/users/jaydenseric/followers","following_url":"https://api.github.com/users/jaydenseric/following{/other_user}","gists_url":"https://api.github.com/users/jaydenseric/gists{/gist_id}","starred_url":"https://api.github.com/users/jaydenseric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaydenseric/subscriptions","organizations_url":"https://api.github.com/users/jaydenseric/orgs","repos_url":"https://api.github.com/users/jaydenseric/repos","events_url":"https://api.github.com/users/jaydenseric/events{/privacy}","received_events_url":"https://api.github.com/users/jaydenseric/received_events","type":"User","site_admin":false},"created_at":"2020-01-02T03:19:49Z","updated_at":"2020-01-02T03:19:49Z","author_association":"NONE","body":"Good do know about the GNU command line arguments guidelines, but is it ubiquitous? [`yargs`](https://npm.im/yargs) works with short args and `=` just fine. I'm having to document this as a breaking change in `jsdoc-md`, migrating from `yargs`: https://github.com/jaydenseric/jsdoc-md/blob/master/changelog.md#major.\r\n\r\n> Does `--a=a` work in the second example?\r\n\r\nYes."}}
{"actor":{"display_login":"jaydenseric"}}