3

In text-based environments, I've sometimes seen confirmation prompts in the form of

Are you sure you want to _______? (Y/n)

Generally, I've understood this to mean that Y is the default, and if I hit something other than a Y or an N (such as hitting the spacebar, Enter, or even Q), it will use the Y option.

So, two questions from this:

  1. Is this display & behavior actually standard, or at least common? Or is it more typical to wait for a Y or N explicitly?
  2. Would the reversed form: Are you sure you want to ______? (y/N) be as understandable that the default is to not perform the action, and that Y must be explicitly hit to do so? And would (N/y) be clearer or more confusing?
5
  • If there's any form of a "text only" or "console" tag, I'd appreciate if someone could add it. And if not, I'll suggest creating it, although I don't expect it to be a commonly used one.
    – Bobson
    Mar 9, 2014 at 23:26
  • There is a "command-line" tag (I added it) which I believe is what you are looking for. The "cli" (Command Line Interface) and "command-line-interface" tags also redirect to the "command-line" tag. Mar 10, 2014 at 0:18
  • @EvilClosetMonkey - Yep, that's what I wanted. I didn't think to try for that one. Thanks!
    – Bobson
    Mar 10, 2014 at 0:31
  • Who are you designing the application/program to?
    – PatomaS
    Mar 10, 2014 at 0:34
  • @PatomaS - In this specific case, I'm working on a Windows console app for another developer, but I'm asking the question in the more general sense, since I've had the thought before.
    – Bobson
    Mar 10, 2014 at 0:35

2 Answers 2

5

Generally, I've understood this to mean that Y is the default, and if I hit something other than a Y or an N (such as hitting the spacebar, Enter, or even Q), it will use the Y option.

You are correct that this implies that Y is the default, on pressing the Enter key. An input other then Y, N or Enter would generally produce an error or (sometimes) be equivalent to the non-default/non-destructive action.

Is this display & behavior actually standard, or at least common? Or is it more typical to wait for a Y or N explicitly?

The practice is at least common, or understood. A new user may ponder the difference, but the use is common enough that they should quickly come to understand the metaphor.

It is not "standard", however. I am unfamiliar with any command-line environment with a helper function that automatically pushes a confirmation line to the screen. It is the responsibility of each application to produce their own confirmation message and, as a result, their own default key logic.

Looking in the GNU Standard for Command Line Interfaces, and IEEE UNIX Specification brings up no information on a command line prompt "standard".

For example, rm -i foo.tar.bz2 will simply ask remove foo.tar.bz2?, with any key other than Y canceling the operation.

I've hunted for other examples, especially ones that use a default, but have not come up with any so far. They are surprisingly difficult to remember when you don't hit the command line very often anymore.

Would the reversed form: Are you sure you want to ______? (y/N) be as understandable that the default is to not perform the action, and that Y must be explicitly hit to do so? And would (N/y) be clearer or more confusing?

The capitalization of the N in this case would indeed imply "No" is the default, on pressing Enter. While "(N/y)" would be recognized, the common order (again, no "standards") is to provide the options as "y/n" - no matter the default.

Taking notes from the GUI side, here are a few HIGs that have sections discussing confirm/deny button order:

Also, Jakob Nielsen wrote an article on the subject: OK-Cancel or Cancel-OK?. Regardless of which option is default, the orders are still the same.

Regarding the order, Nielsen says:

If you're designing a Web-based application, the decision is harder, but you should probably go with the platform preferred by most of your users.

... replace "web-based application" with "command-line interface" and you have as good a recommendation as any.

Regarding default, he says:

Make the most commonly selected button the default and highlight it (except if its action is particularly dangerous; in those cases, you want users to explicitly select the button rather than accidentally activating it by hitting Enter).

... again, just replace the verbiage discussing "buttons" with a "y/n" prompt.

0
0

If you are targeting Linux people, then yes, it is common and many people will understand it. If you are targeting Mac users, they most probably will be puzzled, at least for a moment about that interface and behaviour. If you are targeting Windows users, there are many people that will understand it and many that won't.

On Linux, it's common practice for situations like make oldconfig and some manual configuring of packages, but mostly configuring the kernel by hand on a non-graphical screen. Users of distributions like Ubuntu would be counted as Windows users regarding this aspect since many will only use the GUI.

For people used to GUIs, situations that involve the console are strange, full of insecurity and some prejudice, so if you haven't explained the behaviour and interaction before, they will feel insecure. Still they may "get" the idea and interact as you expect, but the feeling is, most probably, to be of doubts and uncertainty.

I don't have any study to back that up, but you can check countless forums post where the solution involved going to the console, people tried to avoid it as much as possible, and many made mistakes. I use to moderate technical forums time ago.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.