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

[PATCH] Allow an alias to start with "-p"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 18, 2006, 23:25 UTC
Message-ID
<Pine.LNX.4.63.0607190125150.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Now, something like
	[alias]
		pd = -p diff
works as expected.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/git.c b/git.c
index 537af3a..a969b1b 100644
--- a/git.c
+++ b/git.c
@@ -115,6 +115,12 @@ static int handle_alias(int *argcp, cons
 
 			count = split_cmdline(alias_string, &new_argv);
 
+			if (count > 0 && !strcmp(new_argv[0], "-p")) {
+				setup_pager();
+				count--;
+				new_argv++;
+			}
+
 			if (count < 1)
 				die("empty alias for %s", alias_command);
 
-- 
1.4.1.g3c58e
Next: Junio C Hamano
Message 1 of 8 in “Allow an alias to start with "-p"”
  1. Allow an alias to start with "-p"Johannes Schindelin, Jul 18, 2006
  2. Junio C HamanoJul 24, 2006
  3. Allow an alias to start with "-p"Johannes Schindelin, Jul 24, 2006
  4. Junio C HamanoJul 25, 2006
  5. Johannes SchindelinJul 25, 2006
  6. Jeff KingJul 25, 2006
  7. Johannes SchindelinJul 25, 2006
  8. Junio C HamanoJul 25, 2006

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.