|
120 | 120 |
|
121 | 121 | </section> |
122 | 122 | <section id="documenting-command-syntax"> |
123 | | - <title>Documenting Command Syntax</title> |
| 123 | + <title>Documenting Command Terminology and Syntax</title> |
| 124 | + <para> |
| 125 | + Sufficient variation exists in the terminology used to describe commands, options, arguments, and so on that only general advice is provided here. |
| 126 | + </para> |
| 127 | + <para> |
| 128 | + When referring to the command line as specified by Bash and POSIX, follow the terminology that the software uses. |
| 129 | + Never use "flag" when referring to command-line options in POSIX, even though Microsoft often uses the term "flag" when referring to single-character options in Microsoft Windows. |
| 130 | + </para> |
| 131 | + <para> |
| 132 | + The following extract from <command>info libc</command> is of particular interest here: |
| 133 | + </para> |
| 134 | + <blockquote> |
| 135 | + <para> |
| 136 | + "POSIX recommends these conventions for command line arguments. [...] Arguments are options if they begin with a hyphen delimiter (‘-’). Multiple options may follow a hyphen delimiter in a single token if the options do not take arguments. Thus, ‘-abc’ is equivalent to ‘-a -b -c’. [...] Certain options require an argument. For example, the ‘-o’ option of the ‘ld’ command requires an argument—an output file name." and so on. |
| 137 | + </para> |
| 138 | + <para> |
| 139 | + See <command>info libc argument syntax</command> for the full discussion. |
| 140 | + </para> |
| 141 | + </blockquote> |
| 142 | + <para> |
| 143 | + See <command>info bash</command> and the <citetitle>Computer Interfaces</citetitle> chapter of <citetitle>The IBM Style Guide</citetitle> for further guidance. |
| 144 | + </para> |
124 | 145 | <para> |
125 | | - See the <citetitle>Computer Interfaces</citetitle> chapter of <citetitle>The IBM Style Guide</citetitle> for initial guidance. The following examples are intended to highlight correct usage. |
| 146 | + The following examples are intended to highlight correct usage. |
126 | 147 | </para> |
127 | 148 | <example id="exam-documenting-command-syntax"> |
128 | 149 | <title>Cloning a Git Repository</title> |
|
151 | 172 | <term>The command (<command>git clone</command>)</term> |
152 | 173 | <listitem> |
153 | 174 | <para> |
154 | | - The actual command to run, without any optional or replaceable values. This must be typed as is. |
| 175 | + The actual command to run, without any optional or replaceable values. |
| 176 | + This must be typed as is. |
155 | 177 | </para> |
156 | 178 |
|
157 | 179 | </listitem> |
|
161 | 183 | <term>Source options <replaceable>[username@]hostname:/repository_filename</replaceable>)</term> |
162 | 184 | <listitem> |
163 | 185 | <para> |
164 | | - The optional user name, indicated by brackets ([]), followed by the host name and path to the repository. All aspects of this component must be replaced with valid values. |
| 186 | + The optional user name, indicated by brackets ([]), followed by the host name and path to the repository. |
| 187 | + All aspects of this component must be replaced with valid values. |
165 | 188 | </para> |
166 | 189 |
|
167 | 190 | </listitem> |
|
171 | 194 | <term>Target options <replaceable>[directory]</replaceable></term> |
172 | 195 | <listitem> |
173 | 196 | <para> |
174 | | - The optional directory into which the repository will be cloned. This must be replaced with a valid value, or omitted. |
| 197 | + The optional directory into which the repository will be cloned. |
| 198 | + This must be replaced with a valid value, or omitted. |
175 | 199 | </para> |
176 | 200 |
|
177 | 201 | </listitem> |
|
0 commit comments