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

[PATCH 1/6] prompt: don't scream continuation state

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 2, 2013, 14:03 UTC
Message-ID
<1370181822-23450-2-git-send-email-artagnon@gmail.com>
In-Reply-To
<1370181822-23450-1-git-send-email-artagnon@gmail.com>

Currently, when performing any operation that saves the state and expects the user the continue (like rebase, bisect, am), the prompt screams:

  artagnon|completion|REBASE-i 2/2:~/src/git$
Lowercase the words, so we get a more pleasant
  artagnon|completion|rebase-i 2/2:~/src/git$
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-prompt.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index eaf5c36..f99d1f2 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -270,29 +270,29 @@ __git_ps1 ()
 			step=$(cat "$g/rebase-merge/msgnum")
 			total=$(cat "$g/rebase-merge/end")
 			if [ -f "$g/rebase-merge/interactive" ]; then
-				r="|REBASE-i"
+				r="|rebase-i"
 			else
-				r="|REBASE-m"
+				r="|rebase-m"
 			fi
 		else
 			if [ -d "$g/rebase-apply" ]; then
 				step=$(cat "$g/rebase-apply/next")
 				total=$(cat "$g/rebase-apply/last")
 				if [ -f "$g/rebase-apply/rebasing" ]; then
-					r="|REBASE"
+					r="|rebase"
 				elif [ -f "$g/rebase-apply/applying" ]; then
-					r="|AM"
+					r="|am"
 				else
-					r="|AM/REBASE"
+					r="|am/rebase"
 				fi
 			elif [ -f "$g/MERGE_HEAD" ]; then
-				r="|MERGING"
+				r="|merge"
 			elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
-				r="|CHERRY-PICKING"
+				r="|cherry-pick"
 			elif [ -f "$g/REVERT_HEAD" ]; then
-				r="|REVERTING"
+				r="|revert"
 			elif [ -f "$g/BISECT_LOG" ]; then
-				r="|BISECTING"
+				r="|bisect"
 			fi
 
 			b="$(git symbolic-ref HEAD 2>/dev/null)" || {
-- 
1.8.3.457.g2410d5e
Previous: Ramkumar RamachandraNext: Thomas Rast
Message 2 of 33 in “Minor prompt, completion cleanups”
  1. 0/6 Minor prompt, completion cleanupsRamkumar Ramachandra, Jun 2, 2013
  2. 1/6 prompt: don't scream continuation stateRamkumar Ramachandra, Jun 2, 2013
  3. Thomas RastJun 3, 2013
  4. Ramkumar RamachandraJun 3, 2013
  5. Jeff KingJun 3, 2013
  6. Ramkumar RamachandraJun 4, 2013
  7. Jeff KingJun 4, 2013
  8. Junio C HamanoJun 4, 2013
  9. Junio C HamanoJun 3, 2013
  10. 2/6 completion: add common options for rev-parseRamkumar Ramachandra, Jun 2, 2013
  11. Ramkumar RamachandraJun 7, 2013
  12. 3/6 completion: add common options for blameRamkumar Ramachandra, Jun 2, 2013
  13. Thomas RastJun 3, 2013
  14. Ramkumar RamachandraJun 3, 2013
  15. SZEDER GáborJun 3, 2013
  16. Junio C HamanoJun 3, 2013
  17. Peter KreftingJun 6, 2013
  18. Junio C HamanoJun 3, 2013
  19. 4/6 completion: correct completion for format-patchRamkumar Ramachandra, Jun 2, 2013
  20. Felipe ContrerasJun 2, 2013
  21. Ramkumar RamachandraJun 2, 2013
  22. 5/6 completion: clarify difftool completionRamkumar Ramachandra, Jun 2, 2013
  23. Junio C HamanoJun 3, 2013
  24. 6/6 completion: clarify ls-tree, archive, show completionRamkumar Ramachandra, Jun 2, 2013
  25. Junio C HamanoJun 3, 2013
  26. Ramkumar RamachandraJun 4, 2013
  27. Junio C HamanoJun 4, 2013
  28. Junio C HamanoJun 3, 2013
  29. SZEDER GáborJun 3, 2013
  30. Ramkumar RamachandraJun 7, 2013
  31. Junio C HamanoJun 7, 2013
  32. SZEDER GáborJun 7, 2013
  33. Junio C HamanoJun 9, 2013

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.