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

[PATCH] complete: zsh: add missing sub cmd completion candidates

From
TGTerry via GitGitGadget <gitgitgadget@gmail.com>
Date
Apr 17, 2020, 07:11 UTC
Message-ID
<pull.613.git.1587107464322.gitgitgadget@gmail.com>
From: Terry Moschou <tmoschou@gmail.com>

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>
---
    complete: zsh: add missing sub cmd completion candidates
    
    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 [tmoschou@gmail.com]
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-613%2Ftmoschou%2Fupdate-zsh-completion-script-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-613/tmoschou/update-zsh-completion-script-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/613
 contrib/completion/git-completion.zsh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index eef4eff53df..ce47e86b60c 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -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
 }

base-commit: de49261b050d9cd8ec73842356077bc5b606640f
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 3 in “complete: zsh: add missing sub cmd completion candidates”
  1. complete: zsh: add missing sub cmd completion candidatesTerry via GitGitGadget, Apr 17, 2020
  2. Junio C HamanoApr 17, 2020
  3. Felipe ContrerasOct 25, 2020

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.