git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] completion: zsh: nice stuff

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 27, 2013, 20:34 UTC
Message-ID
<1367094846-9830-1-git-send-email-felipe.contreras@gmail.com>
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
Next: Felipe Contreras
Message 1 of 5 in “completion: zsh: nice stuff”
  1. 0/2 completion: zsh: nice stuffFelipe Contreras, Apr 27, 2013
  2. 1/2 complete: zsh: trivial simplificationFelipe Contreras, Apr 27, 2013
  3. 2/2 complete: zsh: use zsh completion for the main cmdFelipe Contreras, Apr 27, 2013
  4. Junio C HamanoApr 27, 2013
  5. Felipe ContrerasApr 27, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.