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

[PATCH] completion: allow 'git remote' subcommand completion

From
Dan McGee <dpmcgee@gmail.com>
Date
Apr 20, 2008, 19:34 UTC
Message-ID
<1208720047-5200-1-git-send-email-dpmcgee@gmail.com>
In-Reply-To
<20080420192259.GI29771@spearce.org>

After typing 'git remote ', the subcommand options were not shown. Fix it by adding the missing __gitcomp call.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
---

Resubmit per Shawn's comments- duh. I was just thinking backwards since remote has a prune subcommand.

 contrib/completion/git-completion.bash |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3f78630..6012047 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1052,6 +1052,7 @@ _git_remote ()
 	local subcommands="add rm show prune update"
 	local subcommand="$(__git_find_subcommand "$subcommands")"
 	if [ -z "$subcommand" ]; then
+		__gitcomp "$subcommands"
 		return
 	fi
 
-- 
1.5.5
Previous: Shawn O. PearceNext: Johannes Schindelin
Message 4 of 11 in “completion: remove use of dashed git commands”
  1. completion: remove use of dashed git commandsDan McGee, Apr 20, 2008
  2. completion: allow 'git remote' subcommand completionDan McGee, Apr 20, 2008
  3. Shawn O. PearceApr 20, 2008
  4. completion: allow 'git remote' subcommand completionDan McGee, Apr 20, 2008
  5. Johannes SchindelinApr 20, 2008
  6. Dan McGeeApr 20, 2008
  7. Johannes SchindelinApr 20, 2008
  8. Dan McGeeApr 20, 2008
  9. Matthieu MoyApr 20, 2008
  10. Junio C HamanoApr 20, 2008
  11. Shawn O. PearceApr 20, 2008

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.