{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/brew/issues/407","repository_url":"https://api.github.com/repos/Homebrew/brew","labels_url":"https://api.github.com/repos/Homebrew/brew/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/407/comments","events_url":"https://api.github.com/repos/Homebrew/brew/issues/407/events","html_url":"https://github.com/Homebrew/brew/pull/407","id":162543550,"number":407,"title":"Call subcommands from zsh completion","user":{"login":"joshka","id":381361,"avatar_url":"https://avatars.githubusercontent.com/u/381361?v=3","gravatar_id":"","url":"https://api.github.com/users/joshka","html_url":"https://github.com/joshka","followers_url":"https://api.github.com/users/joshka/followers","following_url":"https://api.github.com/users/joshka/following{/other_user}","gists_url":"https://api.github.com/users/joshka/gists{/gist_id}","starred_url":"https://api.github.com/users/joshka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshka/subscriptions","organizations_url":"https://api.github.com/users/joshka/orgs","repos_url":"https://api.github.com/users/joshka/repos","events_url":"https://api.github.com/users/joshka/events{/privacy}","received_events_url":"https://api.github.com/users/joshka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-27T20:42:04Z","updated_at":"2016-06-29T22:59:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/407","html_url":"https://github.com/Homebrew/brew/pull/407","diff_url":"https://github.com/Homebrew/brew/pull/407.diff","patch_url":"https://github.com/Homebrew/brew/pull/407.patch"},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/.github/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [ ] Have you successfully run `brew tests` with your changes locally?\r\n\r\n(I'm not sure that these changes require tests so much as a code review and\r\na look at the other related changes.)\r\n\r\n-----\r\n\r\nThis change is inspired by the way that the git zsh completions work by foisting\r\nthe responsibility for sub commands onto the command themselves.\r\nIt is paired with another change that takes the oh-my-zsh brew cask plugin and\r\nmakes it into a first class completion rather than it overriding this.\r\n\r\nThis change requires fixes in brew, oh-my-zsh and the zsh-completions, and will\r\nlikely cause the `brew cask` completions to break until these have been fully\r\naccepted into each project. I'd anticipate doing brew first and the others after.\r\n\r\nSee related PRs:\r\nhttps://github.com/zsh-users/zsh-completions/pull/430\r\nhttps://github.com/robbyrussell/oh-my-zsh/pull/5191"},"comment":{"url":"https://api.github.com/repos/Homebrew/brew/issues/comments/229514587","html_url":"https://github.com/Homebrew/brew/pull/407#issuecomment-229514587","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/407","id":229514587,"user":{"login":"joshka","id":381361,"avatar_url":"https://avatars.githubusercontent.com/u/381361?v=3","gravatar_id":"","url":"https://api.github.com/users/joshka","html_url":"https://github.com/joshka","followers_url":"https://api.github.com/users/joshka/followers","following_url":"https://api.github.com/users/joshka/following{/other_user}","gists_url":"https://api.github.com/users/joshka/gists{/gist_id}","starred_url":"https://api.github.com/users/joshka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshka/subscriptions","organizations_url":"https://api.github.com/users/joshka/orgs","repos_url":"https://api.github.com/users/joshka/repos","events_url":"https://api.github.com/users/joshka/events{/privacy}","received_events_url":"https://api.github.com/users/joshka/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T22:59:05Z","updated_at":"2016-06-29T22:59:05Z","body":"My mistake - I misread your comment. Sorry about that. Should be all fixed now :)\r\n\r\nYes, you understand correctly. I'm flipping the responsibility for calling the brew cask completions to be from the brew completion rather than the other way around. The general convention for completions in zsh is that _command() defines a completion, and these functions are generally loaded automatically by the shell by sticking them somewhere in fpath and running compinit.\r\n\r\nOn your suggestion for extending this, I **think** it's possibly out of scope for this change. Completions installed as part of a tap should be symlinked to /usr/local/share/zsh/site-functions and hence be automatically loaded by the shell. I haven't confirmed this however. Can you please point me to an example of a tap completion that I can look at?"}}
{"actor":{"display_login":"joshka"}}