Skip to content

Commit 670aea5

Browse files
authored
Merge pull request #213 from StyleGuides/daobrien/issue199-option-terminology
Update section on option and argument terminology.
2 parents 97ce633 + 12ffbec commit 670aea5

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

en-US/Design.xml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,30 @@
120120

121121
</section>
122122
<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>
124145
<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.
126147
</para>
127148
<example id="exam-documenting-command-syntax">
128149
<title>Cloning a Git Repository</title>
@@ -151,7 +172,8 @@
151172
<term>The command (<command>git clone</command>)</term>
152173
<listitem>
153174
<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.
155177
</para>
156178

157179
</listitem>
@@ -161,7 +183,8 @@
161183
<term>Source options <replaceable>[username@]hostname:/repository_filename</replaceable>)</term>
162184
<listitem>
163185
<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.
165188
</para>
166189

167190
</listitem>
@@ -171,7 +194,8 @@
171194
<term>Target options <replaceable>[directory]</replaceable></term>
172195
<listitem>
173196
<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.
175199
</para>
176200

177201
</listitem>

0 commit comments

Comments
 (0)