{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/92115427","pull_request_review_id":12621195,"id":92115427,"diff_hunk":"@@ -29,6 +29,19 @@ public enum ArgumentParserError: Swift.Error {\n     case typeMismatch(String)\n }\n \n+/// Various shell completions modes supplied by ArgumentKind.\n+///\n+/// - none:        offers no completions at all; e.g. for string identifier\n+/// - unspecified: no specific completions, will offer tool's completions\n+/// - filename:    offers filename completions\n+/// - values:      offers completions from predefined list\n+public enum ShellCompletion {\n+    case none\n+    case unspecified\n+    case filename\n+    case values([(value: String, description: String)])","path":"Sources/Utility/ArgumentParser.swift","position":14,"original_position":14,"commit_id":"a824a9280b37a12cc4afe1e63e7da1d88d3b5daa","original_commit_id":"a824a9280b37a12cc4afe1e63e7da1d88d3b5daa","user":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"body":"What is value and description?","created_at":"2016-12-13T08:10:39Z","updated_at":"2016-12-13T08:14:45Z","html_url":"https://github.com/apple/swift-package-manager/pull/843#discussion_r92115427","pull_request_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/843","_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/92115427"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/843#discussion_r92115427"},"pull_request":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/843"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/843","id":97471360,"html_url":"https://github.com/apple/swift-package-manager/pull/843","diff_url":"https://github.com/apple/swift-package-manager/pull/843.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/843.patch","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/843","number":843,"state":"open","locked":false,"title":"Generate shell completion scripts","user":{"login":"Bouke","id":235882,"avatar_url":"https://avatars.githubusercontent.com/u/235882?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouke","html_url":"https://github.com/Bouke","followers_url":"https://api.github.com/users/Bouke/followers","following_url":"https://api.github.com/users/Bouke/following{/other_user}","gists_url":"https://api.github.com/users/Bouke/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouke/subscriptions","organizations_url":"https://api.github.com/users/Bouke/orgs","repos_url":"https://api.github.com/users/Bouke/repos","events_url":"https://api.github.com/users/Bouke/events{/privacy}","received_events_url":"https://api.github.com/users/Bouke/received_events","type":"User","site_admin":false},"body":"This is in addition to the work done in [PR#703][1]. The status of this PR is WIP and pushed to get feedback from the maintainers. The bash completion scripts can be generated with the following command:\r\n\r\n    swift package generate-shell-script bash\r\n    swift package generate-shell-script zsh\r\n\r\nThe output of both scripts is also included under `Utilities/{bash,zsh}`.\r\n\r\nI've made a few changes to the public API of ArgumentParser to get all the meta data required to generate the scripts, as well as the descriptions that zsh shows. For the SwiftPM tools, this means no duplication of the arguments anymore inside SwiftPM.\r\n\r\nThings left to tackle:\r\n* [ ] Review of the code\r\n* [ ] Support positional arguments\r\n* [ ] Cleanup the code along with some documentation\r\n* [ ] Compiler flags are still duplicated; should we add some sort of \"discovery\" based on the output of `swift -h`? -- What to do with flags we cannot handle (nicely), like `-l<name>`?\r\n* [ ] How to include this in the toolchain?\r\n\r\n[1]: https://github.com/apple/swift-package-manager/pull/703","created_at":"2016-12-11T20:27:27Z","updated_at":"2016-12-13T08:14:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc88e6d0a87813f70666cd131a69e110a33b91c8","assignee":{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false},"assignees":[{"login":"aciidb0mb3r","id":4136295,"avatar_url":"https://avatars.githubusercontent.com/u/4136295?v=3","gravatar_id":"","url":"https://api.github.com/users/aciidb0mb3r","html_url":"https://github.com/aciidb0mb3r","followers_url":"https://api.github.com/users/aciidb0mb3r/followers","following_url":"https://api.github.com/users/aciidb0mb3r/following{/other_user}","gists_url":"https://api.github.com/users/aciidb0mb3r/gists{/gist_id}","starred_url":"https://api.github.com/users/aciidb0mb3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aciidb0mb3r/subscriptions","organizations_url":"https://api.github.com/users/aciidb0mb3r/orgs","repos_url":"https://api.github.com/users/aciidb0mb3r/repos","events_url":"https://api.github.com/users/aciidb0mb3r/events{/privacy}","received_events_url":"https://api.github.com/users/aciidb0mb3r/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/843/commits","review_comments_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/843/comments","review_comment_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/843/comments","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/a824a9280b37a12cc4afe1e63e7da1d88d3b5daa","head":{"label":"Bouke:generate-shell-scripts-2","ref":"generate-shell-scripts-2","sha":"a824a9280b37a12cc4afe1e63e7da1d88d3b5daa","user":{"login":"Bouke","id":235882,"avatar_url":"https://avatars.githubusercontent.com/u/235882?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouke","html_url":"https://github.com/Bouke","followers_url":"https://api.github.com/users/Bouke/followers","following_url":"https://api.github.com/users/Bouke/following{/other_user}","gists_url":"https://api.github.com/users/Bouke/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouke/subscriptions","organizations_url":"https://api.github.com/users/Bouke/orgs","repos_url":"https://api.github.com/users/Bouke/repos","events_url":"https://api.github.com/users/Bouke/events{/privacy}","received_events_url":"https://api.github.com/users/Bouke/received_events","type":"User","site_admin":false},"repo":{"id":57142461,"name":"swift-package-manager","full_name":"Bouke/swift-package-manager","owner":{"login":"Bouke","id":235882,"avatar_url":"https://avatars.githubusercontent.com/u/235882?v=3","gravatar_id":"","url":"https://api.github.com/users/Bouke","html_url":"https://github.com/Bouke","followers_url":"https://api.github.com/users/Bouke/followers","following_url":"https://api.github.com/users/Bouke/following{/other_user}","gists_url":"https://api.github.com/users/Bouke/gists{/gist_id}","starred_url":"https://api.github.com/users/Bouke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bouke/subscriptions","organizations_url":"https://api.github.com/users/Bouke/orgs","repos_url":"https://api.github.com/users/Bouke/repos","events_url":"https://api.github.com/users/Bouke/events{/privacy}","received_events_url":"https://api.github.com/users/Bouke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Bouke/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":true,"url":"https://api.github.com/repos/Bouke/swift-package-manager","forks_url":"https://api.github.com/repos/Bouke/swift-package-manager/forks","keys_url":"https://api.github.com/repos/Bouke/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Bouke/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Bouke/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/Bouke/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/Bouke/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/Bouke/swift-package-manager/events","assignees_url":"https://api.github.com/repos/Bouke/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/Bouke/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/Bouke/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/Bouke/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Bouke/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Bouke/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/Bouke/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Bouke/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/Bouke/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/Bouke/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/Bouke/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/Bouke/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/Bouke/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/Bouke/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/Bouke/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/Bouke/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/Bouke/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/Bouke/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/Bouke/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Bouke/swift-package-manager/merges","archive_url":"https://api.github.com/repos/Bouke/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Bouke/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/Bouke/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/Bouke/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/Bouke/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/Bouke/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Bouke/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/Bouke/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/Bouke/swift-package-manager/deployments","created_at":"2016-04-26T16:03:54Z","updated_at":"2016-04-26T16:03:55Z","pushed_at":"2016-12-11T20:27:25Z","git_url":"git://github.com/Bouke/swift-package-manager.git","ssh_url":"git@github.com:Bouke/swift-package-manager.git","clone_url":"https://github.com/Bouke/swift-package-manager.git","svn_url":"https://github.com/Bouke/swift-package-manager","homepage":"","size":3982,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"d683bca5eade465e32b869cfbd8bee543b4cbfc0","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44840041,"name":"swift-package-manager","full_name":"apple/swift-package-manager","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift-package-manager","forks_url":"https://api.github.com/repos/apple/swift-package-manager/forks","keys_url":"https://api.github.com/repos/apple/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/apple/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-package-manager/events","assignees_url":"https://api.github.com/repos/apple/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/apple/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/apple/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/apple/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-package-manager/merges","archive_url":"https://api.github.com/repos/apple/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/apple/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-package-manager/deployments","created_at":"2015-10-23T21:41:12Z","updated_at":"2016-12-13T02:23:56Z","pushed_at":"2016-12-13T07:04:19Z","git_url":"git://github.com/apple/swift-package-manager.git","ssh_url":"git@github.com:apple/swift-package-manager.git","clone_url":"https://github.com/apple/swift-package-manager.git","svn_url":"https://github.com/apple/swift-package-manager","homepage":"","size":4939,"stargazers_count":5010,"watchers_count":5010,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":467,"mirror_url":null,"open_issues_count":10,"forks":467,"open_issues":10,"watchers":5010,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/843"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/843"},"issue":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/843"},"comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/843/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/843/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/843/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-package-manager/statuses/a824a9280b37a12cc4afe1e63e7da1d88d3b5daa"}}}}
{"actor":{"display_login":"aciidb0mb3r"}}