Add cvsd to get a colored cvs diff
This commit is contained in:
parent
4a1740f2d6
commit
dc82e6298f
3 changed files with 26 additions and 1 deletions
14
zshrc
14
zshrc
|
@ -299,6 +299,20 @@ if which fossil &>/dev/null; then
|
|||
}
|
||||
fi
|
||||
|
||||
if which cvs &>/dev/null; then
|
||||
cvsd() {
|
||||
if which colordiff &>/dev/null; then
|
||||
cvs diff -uN "$@" | colordiff | less -FRX
|
||||
else
|
||||
red="$(tput setaf 1)"
|
||||
green="$(tput setaf 2)"
|
||||
reset="$(tput sgr0)"
|
||||
cvs diff -uN "$@" | sed "s/^+.*$/$green&$reset/" |
|
||||
sed "s/^-.*$/$red&$reset/" | less -FRX
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
# pkgsrc does not like MAKEFLAGS including -j
|
||||
which pkg_chk &>/dev/null && alias pkg_chk="MAKEFLAGS= pkg_chk"
|
||||
which pkg_rolling-replace &>/dev/null &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue