From adc61a8e1814f73ae61bd79eb2ddd0c821f7de1c Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Wed, 20 Aug 2014 21:34:19 +0200 Subject: Git config: better pager selection within aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- .gitconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitconfig b/.gitconfig index b4aa693..fc32066 100644 --- a/.gitconfig +++ b/.gitconfig @@ -24,16 +24,16 @@ test $1 -eq 0 || echo \"also $1 behind!\";\ }; git_su" pd = "!git_pd() {\ - git diff --color \"$@\" | subdiff | ${PAGER};\ + git diff --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pd" pwd = "!git_pwd() {\ - git wd --color \"$@\" | subdiff | ${PAGER};\ + git wd --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pwd" ps = "!git_ps() {\ - git show --color \"$@\" | subdiff | ${PAGER};\ + git show --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_ps" pswd = "!git_pswd() {\ - git swd --color \"$@\" | subdiff | ${PAGER};\ + git swd --color \"$@\" | subdiff | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pswd" # script to preserve colors; quoting is strange, but "just works" s = "!git_s() {\ @@ -50,7 +50,7 @@ }; git_se" wc = whatchanged pwc = "!git_pwc() {\ - git wc --color \"$@\" | subwc | ${PAGER};\ + git wc --color \"$@\" | subwc | ${GIT_PAGER:-${PAGER:-less}};\ }; git_pwc" # http://www.jukie.net/bart/blog/pimping-out-git-log lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ -- cgit