{"action":"created","issue":{"url":"https://api.github.com/repos/yargs/yargs/issues/461","repository_url":"https://api.github.com/repos/yargs/yargs","labels_url":"https://api.github.com/repos/yargs/yargs/issues/461/labels{/name}","comments_url":"https://api.github.com/repos/yargs/yargs/issues/461/comments","events_url":"https://api.github.com/repos/yargs/yargs/issues/461/events","html_url":"https://github.com/yargs/yargs/pull/461","id":144784597,"number":461,"title":"Avoid repeating options in completion","user":{"login":"elas7","id":7537033,"avatar_url":"https://avatars.githubusercontent.com/u/7537033?v=3","gravatar_id":"","url":"https://api.github.com/users/elas7","html_url":"https://github.com/elas7","followers_url":"https://api.github.com/users/elas7/followers","following_url":"https://api.github.com/users/elas7/following{/other_user}","gists_url":"https://api.github.com/users/elas7/gists{/gist_id}","starred_url":"https://api.github.com/users/elas7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elas7/subscriptions","organizations_url":"https://api.github.com/users/elas7/orgs","repos_url":"https://api.github.com/users/elas7/repos","events_url":"https://api.github.com/users/elas7/events{/privacy}","received_events_url":"https://api.github.com/users/elas7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-31T04:17:51Z","updated_at":"2016-03-31T04:21:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yargs/yargs/pulls/461","html_url":"https://github.com/yargs/yargs/pull/461","diff_url":"https://github.com/yargs/yargs/pull/461.diff","patch_url":"https://github.com/yargs/yargs/pull/461.patch"},"body":"This makes sure that an option won't be suggested for completion if the option, or any of its aliases, is already in the provided arguments.\r\n\r\nPretty much the same thing that was done for command completion in https://github.com/yargs/yargs/pull/183\r\n\r\nI figure this is a good start, but it only checks options in **long form**. Checking for short form depends on whether 'short-option-groups' is enabled or not, and would need to duplicate parts of the parser logic, so it is a bit tricky.\r\n\r\nI also had to modify slightly the integration test that checks that completion for '--help' works. Now it won't complete if the current word is '--help', so I made it try to complete '--h'"},"comment":{"url":"https://api.github.com/repos/yargs/yargs/issues/comments/203746245","html_url":"https://github.com/yargs/yargs/pull/461#issuecomment-203746245","issue_url":"https://api.github.com/repos/yargs/yargs/issues/461","id":203746245,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T04:21:20Z","updated_at":"2016-03-31T04:21:20Z","body":"\n[![Coverage Status](https://coveralls.io/builds/5609081/badge)](https://coveralls.io/builds/5609081)\n\nCoverage remained the same at 100.0% when pulling **fa6154b6848542b12951356fc5799cbed4a6e701 on elas7:completion-options** into **f0a8be606df83c6ba93eeb1aa6cc12551164f76a on yargs:master**.\n"}}