Hi,

Our thin wrapper seems to be doing a good job of providing all the bash
functionality, to zsh, however, we can do more.

This patch enables zsh-specific functionality to list the main commands, and
general options. So we get:

  % git <tab>
  add       -- add file contents to the index
  bisect    -- find by binary search the change that introduced a bug
  branch    -- list, create, or delete branches
  checkout  -- checkout a branch or paths to the working tree
  clone     -- clone a repository into a new directory
  ...

And:

  % git --
  --bare      -- treat the repository as a bare repository
  --exec-path -- path to where your core git programs are ...
  --git-dir   -- set the path to the repository
  --help      -- prints the synopsis and a list of the ..
  --html-path -- print the path where gits HTML ...
  --info-path -- print the path where the Info files are ...
  --man-path  -- print the manpath (see `man(1)`) for the ...

And:

  % git --git-dir<tab>

Automatically adds the space, and then lists only directories.

Plus a lot of very specific argument idioms that are only possible in zsh.

In addition, you can complete commands that are not shown in the list, like
'git rerere'.

Plus, the user can configure the main output of commands:

  zstyle ':completion:*:*:git:*' tag-order '*'

Or:

  zstyle ':completion:*:*:git:*' tag-order 'alias-commands common-commands'

In short, pure awesomeness :)

Felipe Contreras (2):
  complete: zsh: trivial simplification
  complete: zsh: use zsh completion for the main cmd

 contrib/completion/git-completion.zsh | 134 ++++++++++++++++++++++++++++++++--
 1 file changed, 126 insertions(+), 8 deletions(-)

-- 
1.8.2.1.1031.g2ee5873

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to