Debian Codegraph @

ru/refpages/elements/cmdsynopsis/refentry.xml

raw symbols SCIP
1 <refentry id="cmdsynopsis.element">
2 <?dbhtml filename="cmdsynopsis.html"?>
3 <refentryinfo>
4 <pubdate>$Date$</pubdate>
5 <releaseinfo>$Revision$</releaseinfo>
6 </refentryinfo>
7
8 <refmeta>
9 <indexterm><primary>elements</primary>
10 <secondary>cmdsynopsis</secondary></indexterm>
11 <refentrytitle>cmdsynopsis</refentrytitle>
12 <refmiscinfo>Element</refmiscinfo>
13 </refmeta>
14 <refnamediv>
15 <refname>cmdsynopsis</refname>
16 <refpurpose>&cmdsynopsis.purpose;</refpurpose>
17 </refnamediv>
18
19 &cmdsynopsis.synopsis.gen;
20 <refsect1 condition='ref.description'><title>Description</title>
21
22 <para>
23 A <sgmltag>CmdSynopsis</sgmltag> summarizes the options and parameters of
24 a command started from a text prompt. This is usually a program started
25 from the <acronym>DOS</acronym>, Windows, or &UNIX; shell prompt.
26 </para>
27
28 <para>
29 <sgmltag>CmdSynopsis</sgmltag> operates under the following general model:
30 commands have arguments, that may be grouped; arguments and groups may
31 be required or optional and may be repeated.
32 </para>
33
34 <refsect2><title>Processing expectations</title>
35 <para>
36 The processing expectations of <sgmltag>CmdSynopsis</sgmltag> are fairly
37 complex.
38 </para>
39 <itemizedlist>
40 <listitem><para>
41 Arguments are generally identified with a prefix character.
42 </para>
43 <para>
44 In the &UNIX; world, this character is almost
45 universally the dash or hyphen although plus signs and double dashes
46 have become more common in recent years.
47 </para>
48 <para>
49 In the <acronym>DOS</acronym>/Windows world, forward slashes are somewhat more common than
50 dashes.
51 </para>
52 <para>
53 The DocBook processing expectations on this point are intentionally
54 vague. In some environments it may be most convenient to
55 generate these characters automatically, in other environments
56 it may be more convenient to insert them literally in the
57 content.
58 </para>
59 <para>
60 Whichever processing model you choose, note that this will be an
61 interchange issue if you share documents with other users (see
62 <xref linkend="app-interchange"/>).
63 </para></listitem>
64 <listitem><para>
65 Brackets are used to distinguish between optional, required, or
66 plain arguments. Usually square brackets are placed around
67 optional arguments, <literal>[-g]</literal>, and curly brackets are placed around
68 required arguments, <literal>{-g}</literal>. Plain arguments are required, but are
69 not decorated with brackets.
70 </para></listitem>
71 <listitem><para>
72 Repeatable arguments are followed by an ellipsis.
73 </para></listitem>
74 <listitem><para>
75 Multiple arguments within a group are considered exclusive and are
76 separated by vertical bars.
77 </para></listitem>
78 <listitem><para>
79 Groups, like arguments, may be optional, required, or plain and may or
80 may not repeat. The same brackets and ellipses that are used to
81 indicate these characteristics on arguments are used on groups.
82 </para></listitem>
83 <listitem><para>
84 Arguments and groups may nest more-or-less arbitrarily.
85 </para></listitem>
86 <listitem><para>
87 &format.block; The processing system is free to introduce line breaks
88 where required, but the <sgmltag>SBR</sgmltag> element may be introduced
89 by the author to provide an explicit break location.
90 </para></listitem>
91 </itemizedlist>
92 </refsect2>
93
94
95
96 &cmdsynopsis.parents.gen;
97 &cmdsynopsis.children.gen;
98 </refsect1>
99 <refsect1 condition='ref.elem.attrdesc'><title>Attributes</title>
100 <variablelist>
101 <varlistentry><term>cmdlength</term>
102 <listitem>
103 <para>
104 <sgmltag class="attribute">CmdLength</sgmltag> indicates displayed length of
105 the command; this information may be used to intelligently indent
106 command synopses which extend beyond one line.
107 </para>
108 </listitem>
109 </varlistentry>
110 <varlistentry><term>label</term>
111 <listitem>
112 <para>
113 <sgmltag class='attribute'>Label</sgmltag> specifies an identifying number or string
114 that may be used in presentation.
115 </para>
116 </listitem>
117 </varlistentry>
118 <varlistentry><term>sepchar</term>
119 <listitem>
120 <para>
121 <sgmltag class="attribute">SepChar</sgmltag> specifies the character (a space
122 by default) that should separate the <sgmltag>Command</sgmltag> and its
123 top-level arguments.
124 </para>
125 </listitem>
126 </varlistentry>
127 </variablelist>
128 </refsect1>
129 <refsect1 condition='ref.elem.seealso'><title>See Also</title>
130 &cmdsynopsis.seealso.gen;
131 </refsect1>
132 <refsect1><title>Examples</title>
133
134 <informalexample role="example-source">
135 <programlisting>&cmdsynopsis.example.1.txt;</programlisting>
136 </informalexample>
137
138 <anchor id="ex.os.cmdsynopsis.1" role="HACK-ex.out.start"/>
139 &cmdsynopsis.example.1.gen;
140 <anchor id="ex.oe.cmdsynopsis.1" role="HACK-ex.out.end"/>
141
142 <informalexample role="example-source">
143 <programlisting>&cmdsynopsis.example.2.txt;</programlisting>
144 </informalexample>
145
146 <anchor id="ex.os.cmdsynopsis.2" role="HACK-ex.out.start"/>
147 &cmdsynopsis.example.2.gen;
148 <anchor id="ex.oe.cmdsynopsis.2" role="HACK-ex.out.end"/>
149
150 <informalexample role="example-source">
151 <programlisting>&cmdsynopsis.example.3.txt;</programlisting>
152 </informalexample>
153
154 <anchor id="ex.os.cmdsynopsis.3" role="HACK-ex.out.start"/>
155 &cmdsynopsis.example.3.gen;
156 <anchor id="ex.oe.cmdsynopsis.3" role="HACK-ex.out.end"/>
157
158 <informalexample role="example-source">
159 <programlisting>&cmdsynopsis.example.4.txt;</programlisting>
160 </informalexample>
161
162 <anchor id="ex.os.cmdsynopsis.4" role="HACK-ex.out.start"/>
163 &cmdsynopsis.example.4.gen;
164 <anchor id="ex.oe.cmdsynopsis.4" role="HACK-ex.out.end"/>
165
166 <para>
167 Note the use of <sgmltag>SBR</sgmltag> in this example to force line breaks
168 at reasonable places in the synopsis.
169 </para>
170
171 &cmdsynopsis.example.seealso.gen;
172 </refsect1>
173 </refentry>
174