{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/34946968","id":34946968,"diff_hunk":"@@ -186,122 +203,126 @@ __docker_commands() {\n }\n \n __docker_subcommand() {\n-    local -a _command_args\n+    local -a _command_args opts_help opts_cpumem opts_create\n+    local expl help=\"-h --help\"\n+    integer ret=1\n+\n+    opts_help=(\"(: -)\"{-h,--help}\"[Print usage]\")\n+    opts_cpumem=(\n+        \"($help -c --cpu-shares)\"{-c,--cpu-shares=-}\"[CPU shares (relative weight)]:CPU shares:(0 10 100 200 500 800 1000)\"\n+        \"($help)--cpuset=-[CPUs in which to allow execution]:CPU set: \"","path":"contrib/completion/zsh/_docker","position":160,"original_position":160,"commit_id":"f087313490648376430c413ec4b045255efac572","original_commit_id":"f087313490648376430c413ec4b045255efac572","user":{"login":"sdurrheimer","id":1931038,"avatar_url":"https://avatars.githubusercontent.com/u/1931038?v=3","gravatar_id":"","url":"https://api.github.com/users/sdurrheimer","html_url":"https://github.com/sdurrheimer","followers_url":"https://api.github.com/users/sdurrheimer/followers","following_url":"https://api.github.com/users/sdurrheimer/following{/other_user}","gists_url":"https://api.github.com/users/sdurrheimer/gists{/gist_id}","starred_url":"https://api.github.com/users/sdurrheimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdurrheimer/subscriptions","organizations_url":"https://api.github.com/users/sdurrheimer/orgs","repos_url":"https://api.github.com/users/sdurrheimer/repos","events_url":"https://api.github.com/users/sdurrheimer/events{/privacy}","received_events_url":"https://api.github.com/users/sdurrheimer/received_events","type":"User","site_admin":false},"body":"`--cpuset` is replaced by `--cpuset-cpus`, isn't it ?","created_at":"2015-07-18T11:56:39Z","updated_at":"2015-07-18T11:56:39Z","html_url":"https://github.com/docker/docker/pull/14677#discussion_r34946968","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/14677","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/34946968"},"html":{"href":"https://github.com/docker/docker/pull/14677#discussion_r34946968"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/14677"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/14677","id":40134339,"html_url":"https://github.com/docker/docker/pull/14677","diff_url":"https://github.com/docker/docker/pull/14677.diff","patch_url":"https://github.com/docker/docker/pull/14677.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/14677","number":14677,"state":"open","locked":false,"title":"zsh: update zsh completion for docker command","user":{"login":"vincentbernat","id":631446,"avatar_url":"https://avatars.githubusercontent.com/u/631446?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentbernat","html_url":"https://github.com/vincentbernat","followers_url":"https://api.github.com/users/vincentbernat/followers","following_url":"https://api.github.com/users/vincentbernat/following{/other_user}","gists_url":"https://api.github.com/users/vincentbernat/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentbernat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentbernat/subscriptions","organizations_url":"https://api.github.com/users/vincentbernat/orgs","repos_url":"https://api.github.com/users/vincentbernat/repos","events_url":"https://api.github.com/users/vincentbernat/events{/privacy}","received_events_url":"https://api.github.com/users/vincentbernat/received_events","type":"User","site_admin":false},"body":"**THIS PR SHOULD NOT BE MERGED AS IS**\r\n\r\nzsh completion is updated with the content of\r\nfelixr/docker-zsh-completion.\r\n\r\n - felixr/docker-zsh-completion@a93e1cb7bd5a Fix completion of repositories with tags\r\n - felixr/docker-zsh-completion@590ea7059698 Respect provided `--host` flag when invoking docker\r\n - felixr/docker-zsh-completion@6c557babaa3c Several cosmetic improvements\r\n - felixr/docker-zsh-completion@5b63cc591a5c Update completion for `inspect`\r\n - felixr/docker-zsh-completion@b7d8f2f7cc92 Order completions alphabetically\r\n - felixr/docker-zsh-completion@63f6a0622496 Factor completion for `build`, `create` and `run`\r\n - felixr/docker-zsh-completion@ade49ee47f9c Enforce positional arguments being last\r\n - felixr/docker-zsh-completion@850b6b6d95e6 Update completion for build/commit/export/exec/history/import\r\n - felixr/docker-zsh-completion@01bfd8c075dc Remove completion for `insert` and duplicate of `import`\r\n - felixr/docker-zsh-completion@c64a1d730a90 Update completion for `stats` to add `--no-stream` flag\r\n - felixr/docker-zsh-completion@5e81d78b5270 Update completion for `log` to add `--since` flag\r\n - felixr/docker-zsh-completion@b3c146a1a222 Update completion for `run` to add `--group-add` flag\r\n - felixr/docker-zsh-completion@8d4f196ad825 Don't trigger expensive completion function for flags\r\n - felixr/docker-zsh-completion@bd5aaa124d9d Add completion for `--help` everywhere\r\n - felixr/docker-zsh-completion@3a67a0e8c421 Return appropriate status code on completion\r\n - felixr/docker-zsh-completion@4dfcb450eaeb Add Steve as a regular contributor.\r\n - felixr/docker-zsh-completion@996a1c6def35 Add completion for top-level flags\r\n - felixr/docker-zsh-completion@b6df75905f2e Ensure short/long option are not allowed twice\r\n - felixr/docker-zsh-completion@75b6a500a04a Complete repositories with tags only on repository match\r\n - felixr/docker-zsh-completion@5e6292135fcc Factorize completion of images/repositories/tags\r\n - felixr/docker-zsh-completion@1c504eb6779d Handle repositories with \":\"\r\n - felixr/docker-zsh-completion@0a05bf818bbc Update completion for `pause' and `unpause'\r\n - felixr/docker-zsh-completion@b3a63253e2bc Containers name can include Swarm host\r\n\r\nIn summary:\r\n\r\n - Swarm support\r\n - Handling repositories with \":\"\r\n - Rework how completion of images/repositories/tags work:\r\n    - felixr/docker-zsh-completion@5e6292135fcc\r\n    - felixr/docker-zsh-completion@75b6a500a04a\r\n    - felixr/docker-zsh-completion@a93e1cb7bd5a\r\n\r\nThe remaining changes are here to sync changes done in Docker repository\r\n(mostly from PR #14074 and #14555, by @sdurrheimer). With some minor changes:\r\n\r\n - boolean flags don't complete their arguments (true/false)\r\n - reuse of `--host` argument is done with `$opt_arg` to avoid parsing\r\n   error\r\n - build/create/run common options are factorized out\r\n - `--help` flag is handled differently\r\n - `pause` and `unpause` accepts several containers as far as I know, so\r\n   the change is reverted\r\n - some more, but difficult to notice (more completion for some flags I think)\r\n\r\nSome labels are reverted, mostly because I did the merge by copy/pasting\r\nnew options instead of modifying existing options.\r\n\r\nThis commit is partial. The way the `--help` option is handled triggered\r\na major change due to the way things are quoted. Those changes were\r\npartially and programmaticaly reverted in this commit only to minimize\r\nthe changes to review. The next commit will restore the full changes.\r\n\r\nSigned-off-by: Vincent Bernat <vincent@bernat.im>","created_at":"2015-07-16T14:21:36Z","updated_at":"2015-07-18T11:56:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"118ce56b7a2d6ec48f628f195b019f44b294ef06","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/14677/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/14677/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/14677/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/f087313490648376430c413ec4b045255efac572","head":{"label":"vincentbernat:fix/zsh-completion-update-4","ref":"fix/zsh-completion-update-4","sha":"f087313490648376430c413ec4b045255efac572","user":{"login":"vincentbernat","id":631446,"avatar_url":"https://avatars.githubusercontent.com/u/631446?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentbernat","html_url":"https://github.com/vincentbernat","followers_url":"https://api.github.com/users/vincentbernat/followers","following_url":"https://api.github.com/users/vincentbernat/following{/other_user}","gists_url":"https://api.github.com/users/vincentbernat/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentbernat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentbernat/subscriptions","organizations_url":"https://api.github.com/users/vincentbernat/orgs","repos_url":"https://api.github.com/users/vincentbernat/repos","events_url":"https://api.github.com/users/vincentbernat/events{/privacy}","received_events_url":"https://api.github.com/users/vincentbernat/received_events","type":"User","site_admin":false},"repo":{"id":12034011,"name":"docker","full_name":"vincentbernat/docker","owner":{"login":"vincentbernat","id":631446,"avatar_url":"https://avatars.githubusercontent.com/u/631446?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentbernat","html_url":"https://github.com/vincentbernat","followers_url":"https://api.github.com/users/vincentbernat/followers","following_url":"https://api.github.com/users/vincentbernat/following{/other_user}","gists_url":"https://api.github.com/users/vincentbernat/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentbernat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentbernat/subscriptions","organizations_url":"https://api.github.com/users/vincentbernat/orgs","repos_url":"https://api.github.com/users/vincentbernat/repos","events_url":"https://api.github.com/users/vincentbernat/events{/privacy}","received_events_url":"https://api.github.com/users/vincentbernat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vincentbernat/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/vincentbernat/docker","forks_url":"https://api.github.com/repos/vincentbernat/docker/forks","keys_url":"https://api.github.com/repos/vincentbernat/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vincentbernat/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vincentbernat/docker/teams","hooks_url":"https://api.github.com/repos/vincentbernat/docker/hooks","issue_events_url":"https://api.github.com/repos/vincentbernat/docker/issues/events{/number}","events_url":"https://api.github.com/repos/vincentbernat/docker/events","assignees_url":"https://api.github.com/repos/vincentbernat/docker/assignees{/user}","branches_url":"https://api.github.com/repos/vincentbernat/docker/branches{/branch}","tags_url":"https://api.github.com/repos/vincentbernat/docker/tags","blobs_url":"https://api.github.com/repos/vincentbernat/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vincentbernat/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vincentbernat/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/vincentbernat/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vincentbernat/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/vincentbernat/docker/languages","stargazers_url":"https://api.github.com/repos/vincentbernat/docker/stargazers","contributors_url":"https://api.github.com/repos/vincentbernat/docker/contributors","subscribers_url":"https://api.github.com/repos/vincentbernat/docker/subscribers","subscription_url":"https://api.github.com/repos/vincentbernat/docker/subscription","commits_url":"https://api.github.com/repos/vincentbernat/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/vincentbernat/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/vincentbernat/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/vincentbernat/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/vincentbernat/docker/contents/{+path}","compare_url":"https://api.github.com/repos/vincentbernat/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vincentbernat/docker/merges","archive_url":"https://api.github.com/repos/vincentbernat/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vincentbernat/docker/downloads","issues_url":"https://api.github.com/repos/vincentbernat/docker/issues{/number}","pulls_url":"https://api.github.com/repos/vincentbernat/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/vincentbernat/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/vincentbernat/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vincentbernat/docker/labels{/name}","releases_url":"https://api.github.com/repos/vincentbernat/docker/releases{/id}","created_at":"2013-08-11T09:46:24Z","updated_at":"2014-11-22T23:46:09Z","pushed_at":"2015-07-16T18:28:19Z","git_url":"git://github.com/vincentbernat/docker.git","ssh_url":"git@github.com:vincentbernat/docker.git","clone_url":"https://github.com/vincentbernat/docker.git","svn_url":"https://github.com/vincentbernat/docker","homepage":"http://www.docker.io","size":61902,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"48a01a317c14513b4d8452f2932bf80379d7a11b","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-07-18T11:41:06Z","pushed_at":"2015-07-18T10:21:12Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":226441,"stargazers_count":23346,"watchers_count":23346,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5799,"mirror_url":null,"open_issues_count":1037,"forks":5799,"open_issues":1037,"watchers":23346,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/14677"},"html":{"href":"https://github.com/docker/docker/pull/14677"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/14677"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/14677/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/14677/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/14677/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/f087313490648376430c413ec4b045255efac572"}}}}