In Bash, how to add “Are you sure [Y/n]” to any command or alias?

In this particular case, I’d like to add a confirm in Bash for Are you sure? [Y/n] for Mercurial’s hg push ssh://[email protected]//somepath/morepath, which is actually an alias. Is there a standard command that can be added to the alias to achieve it? The reason is that hg push and hg out can sound similar and … Read more