We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yn_yes is a function that takes a string and then acts as a prompt. The implementation could look like this:
yn_yes
functuion yn_yes() { read -p "$1 [Y/n]" -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then return 1; fi }
A use case might be:
if yn_yes "do you really want to do xyz?" then proceed fi exit
And yn_no is the default no case.
yn_no
The text was updated successfully, but these errors were encountered:
Also yn_abort could come in handy. It can be invoked after a critical warning if the user wants to continue or quit the script.
yn_abort
Sorry, something went wrong.
No branches or pull requests
yn_yes
is a function that takes a string and then acts as a prompt. The implementation could look like this:A use case might be:
And
yn_no
is the default no case.The text was updated successfully, but these errors were encountered: