alias diff="diff --color=auto"
alias grep="grep --color=auto"
alias ip="ip -color=auto"
alias ls="ls --color=auto"
export MANROFFOPT="-P -c"
export LESS='-R --use-color -Dd+r$Du+b$'

zmodload zsh/zpty

pty() {
    zpty pty-${UID} ${1+$@}
    if [[ ! -t 1 ]]; then
        setopt local_traps
        trap '' INT
    fi
    zpty -r pty-${UID}
    zpty -d pty-${UID}
}

ptyless() {
    pty "$@" | less
}
