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

[PATCH 2/2] completion: unite --format and --pretty for 'log' and 'show'

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Oct 8, 2011, 01:09 UTC
Message-ID
<20111008010934.GC11561@goldbirke>
In-Reply-To
<20111008010432.GA11561@goldbirke>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 contrib/completion/git-completion.bash |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 98282435..b36f9e70 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1553,14 +1553,9 @@ _git_log ()
 		merge="--merge"
 	fi
 	case "$cur" in
-	--pretty=*)
+	--pretty=*|--format=*)
 		__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
-			" "" "${cur##--pretty=}"
-		return
-		;;
-	--format=*)
-		__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
-			" "" "${cur##--format=}"
+			" "" "${cur#*=}"
 		return
 		;;
 	--date=*)
@@ -2365,14 +2360,9 @@ _git_show ()
 	__git_has_doubledash && return
 
 	case "$cur" in
-	--pretty=*)
-		__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
-			" "" "${cur##--pretty=}"
-		return
-		;;
-	--format=*)
+	--pretty=*|--format=*)
 		__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
-			" "" "${cur##--format=}"
+			" "" "${cur#*=}"
 		return
 		;;
 	--*)
-- 
1.7.7.187.ga41de
Previous: SZEDER Gábor
Message 7 of 7 in “completion: unite --reuse-message and --reedit-message handling”
  1. 1/3 completion: unite --reuse-message and --reedit-message handlingTeemu Matilainen, Oct 6, 2011
  2. 2/3 completion: commit --fixup and --squashTeemu Matilainen, Oct 6, 2011
  3. 3/3 completion: push --set-upstreamTeemu Matilainen, Oct 6, 2011
  4. Junio C HamanoOct 6, 2011
  5. SZEDER GáborOct 8, 2011
  6. 1/2 completion: unite --reuse-message and --reedit-message for 'notes'SZEDER Gábor, Oct 8, 2011
  7. 2/2 completion: unite --format and --pretty for 'log' and 'show'SZEDER Gábor, Oct 8, 2011

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.