#!/usr/bin/env bash # YES_ZSH pause() { [ -n "${ZSH_VERSION:-}" ] \ && read -sk '?Press any key to continue ' || read -n1 -u 1 -sp 'Press any key to continue ' } [ "${SOURCING:-0}" -gt 0 ] || pause "$@"