diff options
author | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2020-07-06 16:00:43 +0100 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2020-07-06 16:00:43 +0100 |
commit | aec5e16365a2b0e6fff384fa3cabb0de5c19125c (patch) | |
tree | ba3f265dfd2421760da2462500ac8523427bba1e /git-logc | |
parent | safer `@ARGV` placement (diff) | |
download | git-prompt-aec5e16365a2b0e6fff384fa3cabb0de5c19125c.tar.gz git-prompt-aec5e16365a2b0e6fff384fa3cabb0de5c19125c.tar.bz2 git-prompt-aec5e16365a2b0e6fff384fa3cabb0de5c19125c.zip |
honour `$PAGER`
Diffstat (limited to 'git-logc')
-rwxr-xr-x | git-logc | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 { |