Git development
 help / color / mirror / Atom feed
* [PATCH] Allow an alias to start with "-p"
@ 2006-07-18 23:25 Johannes Schindelin
  2006-07-24  6:32 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2006-07-18 23:25 UTC (permalink / raw)
  To: git, junkio


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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-25 20:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-18 23:25 [PATCH] Allow an alias to start with "-p" Johannes Schindelin
2006-07-24  6:32 ` Junio C Hamano
2006-07-24 12:10   ` Johannes Schindelin
2006-07-25  0:36     ` Junio C Hamano
2006-07-25  6:27       ` Johannes Schindelin
2006-07-25  5:03     ` Jeff King
2006-07-25  6:18       ` Johannes Schindelin
2006-07-25 20:34         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox