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

[PATCH] bash completion: Add --autostash and --no-autostash to pull

From
Albert Astals Cid <albert.astals.cid@kdab.com>
Date
Nov 21, 2017, 14:39 UTC
Message-ID
<94455771.5s97AYBuGd@yoga>

Ideally we should only autocomplete if pull has --rebase since they only work with it but could not figure out how to do that and the error message of doing git pull --autostash points out that you need --rebase so i guess it's good enough

Signed-off-by: Albert Astals Cid <albert.astals.cid@kdab.com>
---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-
completion.bash
index 539d7f84f..7ded58f38 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1923,6 +1923,7 @@ _git_pull ()
 	--*)
 		__gitcomp "
 			--rebase --no-rebase
+			--autostash --no-autostash
 			$__git_merge_options
 			$__git_fetch_options
 		"
-- 
2.15.0
Next: SZEDER Gábor
Message 1 of 2 in “bash completion: Add --autostash and --no-autostash to pull”
  1. bash completion: Add --autostash and --no-autostash to pullAlbert Astals Cid, Nov 21, 2017
  2. SZEDER GáborNov 24, 2017

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.