]> git.ipfire.org Git - thirdparty/git.git/commitdiff
complete: zsh: add missing sub cmd completion candidates
authorTerry Moschou <tmoschou@gmail.com>
Fri, 17 Apr 2020 07:11:04 +0000 (07:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Apr 2020 19:11:34 +0000 (12:11 -0700)
Add missing 'restore' and 'switch' sub commands to zsh completion
candidate output. E.g.

  $ git re<tab>
  rebase    -- forward-port local commits to the updated upstream head
  reset     -- reset current HEAD to the specified state
  restore   -- restore working tree files

  $ git s<tab>
  show      -- show various types of objects
  status    -- show the working tree status
  switch    -- switch branches

Signed-off-by: Terry Moschou <tmoschou@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.zsh

index eef4eff53dff12f86d8982e6818ec92086aa4d80..ce47e86b60c04c7a398c20ded985f4187e5d3533 100644 (file)
@@ -150,9 +150,11 @@ __git_zsh_cmd_common ()
        push:'update remote refs along with associated objects'
        rebase:'forward-port local commits to the updated upstream head'
        reset:'reset current HEAD to the specified state'
+       restore:'restore working tree files'
        rm:'remove files from the working tree and from the index'
        show:'show various types of objects'
        status:'show the working tree status'
+       switch:'switch branches'
        tag:'create, list, delete or verify a tag object signed with GPG')
        _describe -t common-commands 'common commands' list && _ret=0
 }