git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] completion: zsh: nice stuff
@ 2013-04-27 20:34 Felipe Contreras
  2013-04-27 20:34 ` [PATCH 1/2] complete: zsh: trivial simplification Felipe Contreras
  2013-04-27 20:34 ` [PATCH 2/2] complete: zsh: use zsh completion for the main cmd Felipe Contreras
  0 siblings, 2 replies; 5+ messages in thread
From: Felipe Contreras @ 2013-04-27 20:34 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Matthieu Moy, Ramkumar Ramachandra,
	Felipe Contreras

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-27 21:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-27 20:34 [PATCH 0/2] completion: zsh: nice stuff Felipe Contreras
2013-04-27 20:34 ` [PATCH 1/2] complete: zsh: trivial simplification Felipe Contreras
2013-04-27 20:34 ` [PATCH 2/2] complete: zsh: use zsh completion for the main cmd Felipe Contreras
2013-04-27 21:39   ` Junio C Hamano
2013-04-27 21:53     ` Felipe Contreras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).