#!/usr/bin/env bash # YES_ZSH # YES_BASH # NO_DASH # NO_ASH pause() { ### @- ### pause — the companion script of [`confirm`.](#confirm) ### ### ``` ### $ pause ### Press any key to continue ### $ ### ``` [ -n "${ZSH_VERSION:-}" ] \ && read -sk '?Press any key to continue ' || read -n1 -u 1 -sp 'Press any key to continue ' } [ -n "${preload+-}" ] || pause "$@"