Convention/standard on using curly braces around options

command lineconventionsman

The man page for tar in Arch Linux SYNOPSIS section starts with:

tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]

I perfectly understand that in this situation it means that exactly one of the options in the curly braces must be given because it says so further down in the man page. Is there some kind of standard or convention on using {} around a list of mutually exclusive options?

All I can find is a User's group tutorial on man from 1998 where it says:

Some options will have a limited list of choices. A list of choices
will be comma separated and put between braces.

{choice1,choice2}
{yes,no}

Seems like every convention (like this one from the Open Group) or man page describes only square brackets ([) or vertical lines (|).

Best Answer

This is a great question (and still open years later). I think the answer is now officially answered in this Google document:

  • Required items: no brackets
  • Optional mutually exclusive items: square brackets, pipe delimited
  • Required mutually exclusive items: curly braces, pipe delimited