summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-08-20 21:34:19 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-08-20 21:34:19 +0200
commitadc61a8e1814f73ae61bd79eb2ddd0c821f7de1c (patch)
tree33df6b54a351a239ad493217265df8e66fa04785
parentd5a7d83c7390f311c123474e0cc44eff2b497136 (diff)
downloaddotfiles-adc61a8e1814f73ae61bd79eb2ddd0c821f7de1c.zip
dotfiles-adc61a8e1814f73ae61bd79eb2ddd0c821f7de1c.tar.gz
dotfiles-adc61a8e1814f73ae61bd79eb2ddd0c821f7de1c.tar.xz
Git config: better pager selection within aliases
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--.gitconfig10
1 files 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' \