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

[PATCH v3 1/1] completion: offer '--edit-todo' during interactive rebase

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
Aug 5, 2015, 13:40 UTC
Message-ID
<1331856388.22157.1438782000895.JavaMail.open-xchange@app06.ox.hosteurope.de>
In-Reply-To
<20150801112507.Horde.r5NtLucc5RqP3Wy8gdC7CQ1@webmail.informatik.kit.edu>
Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Helped-by: John Keeping <john@keeping.me.uk>
Helped-by: SZEDER Gábor <szeder@ira.uka.de>
---
Tested by:
- ensuring I'm in a bash shell
- source git-completion.bash
- git rebase -i HEAD~1, choose edit instead of pick in the editor
- on entering "git rebase" you should be offered "--edit-todo"
 contrib/completion/git-completion.bash | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index c97c648..087771b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1667,7 +1667,10 @@ _git_push ()
 _git_rebase ()
 {
 	local dir="$(__gitdir)"
-	if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
+	if [ -f "$dir"/rebase-merge/interactive ]; then
+		__gitcomp "--continue --skip --abort --edit-todo"
+		return
+	elif [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then
 		__gitcomp "--continue --skip --abort"
 		return
 	fi
-- 
2.4.3.413.ga5fe668
Previous: SZEDER Gábor
Message 9 of 9 in “completion: Add '--edit-todo' to rebase”
  1. completion: Add '--edit-todo' to rebaseThomas Braun, Jul 13, 2015
  2. John KeepingJul 13, 2015
  3. completion: Add '--edit-todo' to rebaseThomas Braun, Jul 27, 2015
  4. SZEDER GáborJul 30, 2015
  5. John KeepingJul 30, 2015
  6. SZEDER GáborJul 31, 2015
  7. Thomas BraunJul 31, 2015
  8. SZEDER GáborAug 1, 2015
  9. 1/1 completion: offer '--edit-todo' during interactive rebaseThomas Braun, Aug 5, 2015

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.