libdnf5::cli::utils::userconfirm

LIBDNF_CLI_API bool libdnf5::cli::utils::userconfirm::userconfirm (bool assume_no, bool assume_yes, bool default_yes)

Asks the user for interactive confirmation. Returns false immediately if assume_no is set, true if assume_yes is set. Otherwise prompts the user; default_yes determines the answer when the user presses Enter without typing anything, and the prompt displayed ([Y/n] or [y/N]).

template<class Config>
bool libdnf5::cli::utils::userconfirm::userconfirm(Config &config, bool default_yes)

Asks the user for confirmation. Reads assumeyes and assumeno from config; uses default_yes as the default answer when neither is set.

template<class Config>
bool libdnf5::cli::utils::userconfirm::userconfirm(Config &config)

Asks the user for confirmation. Reads assumeyes, assumeno, and the default answer from the configuration’s defaultyes option.