I have a Git alias update that I would like to outfit with branch-name completion.  The alias is defined like so:
[alias]
        update = "!f() { git push . origin/$1:$1; }; f"
(It updates a local tracking branch with its upstream version, without having to check out the branch. Not really important to the specific question, though.)
I would like the command to tab-complete existing branch names for its $1 argument.  I know I can define a function called _git-update to control completion, but I'm missing some pieces to get it to work:
_git-update ()
{
  ***some-function-here*** "$(__git_branch_names)"
}
I am using the completions installed on OS X by brew install zsh-completions, which is the set at https://github.com/zsh-users/zsh-completions .
(This question is directly analogous to https://stackoverflow.com/a/41307951/169947, but for Zsh instead of Bash.)
 
     
     
     
    