$Date$
$Revision$
elements
cmdsynopsis
cmdsynopsis
Element
cmdsynopsis
&cmdsynopsis.purpose;
&cmdsynopsis.synopsis.gen;
Description
A CmdSynopsis summarizes the options and parameters of
a command started from a text prompt. This is usually a program started
from the DOS, Windows, or &UNIX; shell prompt.
CmdSynopsis operates under the following general model:
commands have arguments, that may be grouped; arguments and groups may
be required or optional and may be repeated.
Processing expectations
The processing expectations of CmdSynopsis are fairly
complex.
Arguments are generally identified with a prefix character.
In the &UNIX; world, this character is almost
universally the dash or hyphen although plus signs and double dashes
have become more common in recent years.
In the DOS/Windows world, forward slashes are somewhat more common than
dashes.
The DocBook processing expectations on this point are intentionally
vague. In some environments it may be most convenient to
generate these characters automatically, in other environments
it may be more convenient to insert them literally in the
content.
Whichever processing model you choose, note that this will be an
interchange issue if you share documents with other users (see
).
Brackets are used to distinguish between optional, required, or
plain arguments. Usually square brackets are placed around
optional arguments, [-g], and curly brackets are placed around
required arguments, {-g}. Plain arguments are required, but are
not decorated with brackets.
Repeatable arguments are followed by an ellipsis.
Multiple arguments within a group are considered exclusive and are
separated by vertical bars.
Groups, like arguments, may be optional, required, or plain and may or
may not repeat. The same brackets and ellipses that are used to
indicate these characteristics on arguments are used on groups.
Arguments and groups may nest more-or-less arbitrarily.
&format.block; The processing system is free to introduce line breaks
where required, but the SBR element may be introduced
by the author to provide an explicit break location.
&cmdsynopsis.parents.gen;
&cmdsynopsis.children.gen;
Attributes
cmdlength
CmdLength indicates displayed length of
the command; this information may be used to intelligently indent
command synopses which extend beyond one line.
label
Label specifies an identifying number or string
that may be used in presentation.
sepchar
SepChar specifies the character (a space
by default) that should separate the Command and its
top-level arguments.
See Also
&cmdsynopsis.seealso.gen;
Examples
&cmdsynopsis.example.1.txt;
&cmdsynopsis.example.1.gen;
&cmdsynopsis.example.2.txt;
&cmdsynopsis.example.2.gen;
&cmdsynopsis.example.3.txt;
&cmdsynopsis.example.3.gen;
&cmdsynopsis.example.4.txt;
&cmdsynopsis.example.4.gen;
Note the use of SBR in this example to force line breaks
at reasonable places in the synopsis.
&cmdsynopsis.example.seealso.gen;