config_query NVI_SYMLINK "Would you like to have /usr/bin/[vi|ex] as a symlink to /usr/bin/n[vi|ex]?" n &&

if [ "${NVI_SYMLINK}" == "y" ]; then
  if [ -e /usr/bin/vi ] && `readlink -f "/usr/bin/vi" | grep -Eqv "nvi"`; then
    message "${MESSAGE_COLOR}VI is already provided by another vi clone. Recast it" &&
    message "with the vi symlink option disabled, then recast ${SPELL}.${DEFAULT_COLOR}" &&
    NVI_SYMLINK="n"
  fi &&

  if [ -e /usr/bin/ex ] && `readlink -f "/usr/bin/ex" | grep -Eqv "nex"`; then
    message "${MESSAGE_COLOR}EX is already provided by another ex clone. Recast it" &&
    message "with the ex symlink option disabled, then recast ${SPELL}.${DEFAULT_COLOR}" &&
    NVI_SYMLINK="n"
  fi
fi
