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

[PATCH 4/5] completion: complete values for log.date

From
Stephen Boyd <bebarino@gmail.com>
Date
May 4, 2009, 06:25 UTC
Message-ID
<1241418335-18474-4-git-send-email-bebarino@gmail.com>
In-Reply-To
<1241418335-18474-3-git-send-email-bebarino@gmail.com>
Add raw to the date formats too.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 contrib/completion/git-completion.bash |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 023b0c9..d67ffd9 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1116,6 +1116,7 @@ __git_log_shortlog_options="
 "
 
 __git_log_pretty_formats="oneline short medium full fuller email raw format:"
+__git_log_date_formats="relative iso8601 rfc2822 short local default raw"
 
 _git_log ()
 {
@@ -1139,9 +1140,7 @@ _git_log ()
 		return
 		;;
 	--date=*)
-		__gitcomp "
-			relative iso8601 rfc2822 short local default
-		" "" "${cur##--date=}"
+		__gitcomp "$__git_log_date_formats" "" "${cur##--date=}"
 		return
 		;;
 	--*)
@@ -1352,6 +1351,10 @@ _git_config ()
 		__gitcomp "man info web html"
 		return
 		;;
+	log.date)
+		__gitcomp "$__git_log_date_formats"
+		return
+		;;
 	*.*)
 		COMPREPLY=()
 		return
-- 
1.6.2.3
Previous: Stephen BoydNext: Stephen Boyd
Message 4 of 6 in “completion: add missing configuration variables to _git_config()”
  1. 1/5 completion: add missing configuration variables to _git_config()Stephen Boyd, May 4, 2009
  2. 2/5 completion: add {gui,diff,merge}tool, man, and pager config variablesStephen Boyd, May 4, 2009
  3. 3/5 completion: complete values for help.formatStephen Boyd, May 4, 2009
  4. 4/5 completion: complete values for log.dateStephen Boyd, May 4, 2009
  5. 5/5 completion: complete values for send-emailStephen Boyd, May 4, 2009
  6. Shawn O. PearceMay 4, 2009

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.