{"action":"created","issue":{"url":"https://api.github.com/repos/75lb/command-line-commands/issues/3","repository_url":"https://api.github.com/repos/75lb/command-line-commands","labels_url":"https://api.github.com/repos/75lb/command-line-commands/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/75lb/command-line-commands/issues/3/comments","events_url":"https://api.github.com/repos/75lb/command-line-commands/issues/3/events","html_url":"https://github.com/75lb/command-line-commands/issues/3","id":153895676,"number":3,"title":"Support global arguments","user":{"login":"justinfagnani","id":522948,"avatar_url":"https://avatars.githubusercontent.com/u/522948?v=3","gravatar_id":"","url":"https://api.github.com/users/justinfagnani","html_url":"https://github.com/justinfagnani","followers_url":"https://api.github.com/users/justinfagnani/followers","following_url":"https://api.github.com/users/justinfagnani/following{/other_user}","gists_url":"https://api.github.com/users/justinfagnani/gists{/gist_id}","starred_url":"https://api.github.com/users/justinfagnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinfagnani/subscriptions","organizations_url":"https://api.github.com/users/justinfagnani/orgs","repos_url":"https://api.github.com/users/justinfagnani/repos","events_url":"https://api.github.com/users/justinfagnani/events{/privacy}","received_events_url":"https://api.github.com/users/justinfagnani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T23:55:19Z","updated_at":"2016-05-10T08:21:46Z","closed_at":null,"body":"We'd like to handle flags like `--version` and `--help` without require a command name.\r\n\r\nSomething like this would be nice:\r\n\r\n```javascript\r\n\r\nlet cli = commandLineCommands([\r\n  { name: 'help' },\r\n  { name: 'run', definitions: [ { name: 'why', type: String } ] },\r\n], {\r\n  globalDefinitions: [\r\n    { name: 'version', type: Boolean },\r\n  ],\r\n});\r\n\r\nlet command = cli.parse();\r\nif (command.name == null && command.options.version) {\r\n  printVersion();\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/75lb/command-line-commands/issues/comments/218090055","html_url":"https://github.com/75lb/command-line-commands/issues/3#issuecomment-218090055","issue_url":"https://api.github.com/repos/75lb/command-line-commands/issues/3","id":218090055,"user":{"login":"75lb","id":1247980,"avatar_url":"https://avatars.githubusercontent.com/u/1247980?v=3","gravatar_id":"","url":"https://api.github.com/users/75lb","html_url":"https://github.com/75lb","followers_url":"https://api.github.com/users/75lb/followers","following_url":"https://api.github.com/users/75lb/following{/other_user}","gists_url":"https://api.github.com/users/75lb/gists{/gist_id}","starred_url":"https://api.github.com/users/75lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/75lb/subscriptions","organizations_url":"https://api.github.com/users/75lb/orgs","repos_url":"https://api.github.com/users/75lb/repos","events_url":"https://api.github.com/users/75lb/events{/privacy}","received_events_url":"https://api.github.com/users/75lb/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T08:21:46Z","updated_at":"2016-05-10T08:21:46Z","body":"yep, i'm on the case. This feature will land soon, cheers!"}}