Add PAGER environment variable with -r so that colors for icdiff work.

add icdiff aliases.
This commit is contained in:
Ivan Malison 2015-01-12 12:54:20 -08:00
parent 80b0c6f52c
commit 82ca1f2994
2 changed files with 7 additions and 2 deletions

View File

@ -16,6 +16,8 @@
ff = merge --ff-only
ffo = !git ffr origin
ffr = "!ffr() { git fetch $1 && git ff $1/$(git which-branch) && git suir; }; ffr"
icd = "!d() { git difftool --no-prompt --extcmd 'icdiff' $@ | $(git config --get core.pager); }; d"
icdl = "!d() { git difftool --no-prompt --extcmd 'icdiff --line-numbers' $@ | $(git config --get core.pager); }; d"
ignore = "!i() { printf \"\n$1\" >> "`git root`/.gitignore"; }; i"
ignore-untracked="!git untracked | xargs -n1 git ignore"
l = log --pretty=oneline --graph
@ -45,7 +47,7 @@
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
pager = less -F -X
pager = less -FXr
[color]
# Use colors in Git commands that are capable of colored output when

View File

@ -4,6 +4,9 @@ elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
export PAGER='less -XFr'
export GITPAGER='less -XFr'
# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
export HISTFILESIZE=10000000