1
1
Fork 0

Don't rely on tput

This commit is contained in:
Jonathan Schleifer 2020-09-18 13:47:57 +00:00
parent 245e331014
commit cf67c7ae47
3 changed files with 9 additions and 9 deletions

6
zshrc
View file

@ -230,9 +230,9 @@ __has_command tmux && alias tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf"
if ! __has_command colordiff; then
colordiff() {
red="$(tput setaf 1)"
green="$(tput setaf 2)"
reset="$(tput sgr0)"
local red=$(printf "\033[31m")
local green=$(printf "\033[32m")
local reset=$(printf "\033[0m")
sed "s/^+.*$/$green&$reset/" | sed "s/^-.*$/$red&$reset/"
}
fi