Skip to main content

Module prompt

Module prompt 

Source
Expand description

The [y/N] confirmation every destructive CLI command asks.

Anything but y or yes — including an empty line or a closed stdin — is a no, so a script that forgot --yes stops rather than deleting.

Functions§

confirm
Prints "{prompt} [y/N] " and reads one line from reader.