#!/bin/sh
#
# delta - delta variable column width side by side

# shellcheck disable=SC2312

COLUMNS=${COLUMNS:-$(tput cols)}
if [ -n "${COLUMNS}" ] && [ "${COLUMNS}" -gt 120 ]; then
  command delta --side-by-side --width "${COLUMNS}" "$(escape "$@")"
else
  command delta "$(escape "${@:-/dev/stdin}")"
fi
