forked from colonelpanic/dotfiles
Add PAGER environment variable with -r so that colors for icdiff work.
add icdiff aliases.
This commit is contained in:
parent
80b0c6f52c
commit
82ca1f2994
@ -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
|
||||
@ -39,13 +41,13 @@
|
||||
clone = clone --recursive
|
||||
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"
|
||||
shas = log HEAD --pretty=format:%H
|
||||
shas = log HEAD --pretty=format:%H
|
||||
|
||||
[core]
|
||||
# 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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user