From aec5e16365a2b0e6fff384fa3cabb0de5c19125c Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Mon, 6 Jul 2020 16:00:43 +0100 Subject: honour `$PAGER` --- git-logc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-logc b/git-logc index 45523fa..de64a72 100755 --- a/git-logc +++ b/git-logc @@ -39,7 +39,9 @@ sub class_decor { open my $fh,'-|','git','log','--graph','--decorate=full','--pretty=format:%x00%h%x00%d%x00%ar%x00%aN%x00%s',($tty ? '--color=always' : ()),@ARGV; my $out; if ($tty) { - open $out,'|-','less'; + my @pager = $ENV{PAGER}; + @pager = (qw(less -S)) unless @pager; + open $out,'|-',@pager; $SIG{PIPE}=sub{exit 0}; } else { -- cgit v1.2.3