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 ff = merge --ff-only
ffo = !git ffr origin ffo = !git ffr origin
ffr = "!ffr() { git fetch $1 && git ff $1/$(git which-branch) && git suir; }; ffr" 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 = "!i() { printf \"\n$1\" >> "`git root`/.gitignore"; }; i"
ignore-untracked="!git untracked | xargs -n1 git ignore" ignore-untracked="!git untracked | xargs -n1 git ignore"
l = log --pretty=oneline --graph l = log --pretty=oneline --graph
@ -39,13 +41,13 @@
clone = clone --recursive clone = clone --recursive
diff-excluding = "!f() { exclude=$1; shift; git diff $1 $2 --name-only | grep -v $exclude | xargs git diff "$@" --; }; f" diff-excluding = "!f() { exclude=$1; shift; git diff $1 $2 --name-only | grep -v $exclude | xargs git diff "$@" --; }; f"
file-exists = "!f() { git ls-files $1 --error-unmatch > /dev/null 2> /dev/null; }; f" file-exists = "!f() { git ls-files $1 --error-unmatch > /dev/null 2> /dev/null; }; f"
shas = log HEAD --pretty=format:%H shas = log HEAD --pretty=format:%H
[core] [core]
# Use custom `.gitignore` and `.gitattributes` # Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes attributesfile = ~/.gitattributes
pager = less -F -X pager = less -FXr
[color] [color]
# Use colors in Git commands that are capable of colored output when # 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 export TERM=xterm-256color
fi fi
export PAGER='less -XFr'
export GITPAGER='less -XFr'
# Larger bash history (allow 32³ entries; default is 500) # Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768 export HISTSIZE=32768
export HISTFILESIZE=10000000 export HISTFILESIZE=10000000