This is a question about best practice, not a specific language/ syntax question.
When requesting user confirmation, e.g. Y/N to either continue execution despite some risky condition or exit to fix said condition, is it preferable to use Y or N for continue?
Obviously, that will depend on the phrasing of the question. For example, in a script I'm working on right now, I check a certain directory for a certain type of file that ideally should not be there, although it is not catastrophic if it is. If I find any I warn the user and give them the option to either quit so they can delete them or continue execution anyway. I can get the user's input using at least two phrasings:
Option 1:
"There are some files that should be deleted. Do you want to delete them? Hit Y to quit so you can delete them, or N to continue execution."
Option 2:
"There are some files that should be deleted. Do you want to continue execution? Hit Y to continue, or N to quit so you can delete them."
I'm wondering which of the above options will reduce the likelihood that a frustrated or tired user who is not paying attention will opt to continue execution despite the risks.
I.e. if a user is going to somewhat randomly pick Y or N, and there is some known propensity of the "average user" to randomly pick one over the other, I'd like to make quitting the more likely option to be selected in such a case.
PS: I have no idea how to tag this question, and I don't see a "best practices" tag.
c
for continue,q
for quit – that at least makes (/should make) the user think about what they actually want to happen, whereas Yes-or-No type questions often lead to confusion and collide with what the user expects to happen in a situation, resp. with what they instinctively assume should be the positive (Yes) or negative (No) outcome of the situation.