Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions templates/base_ditamap.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
{{#if []}}<topicref href="{{[]}}" format="ditamap" scope="local"/>{{/if}}
{{/each}}
<topicref href="{{xmlFile 'cli_reference_help'}}" type="concept" format="dita" scope="local"/>
<topicref href="../../sfdx_dev/workspace_setup/sfdx_dev_cli_deprecation.xml" type="concept"
format="dita" scope="local"/>
<topicref href="../../sfdx_setup/sfdx_setup_other_plugins.xml" type="concept"
format="dita" scope="local"/>
</topicref>
</map>
89 changes: 38 additions & 51 deletions templates/cli_reference_help.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ THIS FILE IS AUTOGENERATED. DON’T MAKE CHANGES TO THIS FILE IN PERFORCE! YOUR
IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR DETAILS.

-->
<title>Help for Salesforce CLI Commands</title>
<shortdesc>The <codeph otherprops="nolang">-h</codeph> | <codeph otherprops="nolang"
>--help</codeph> parameter shows details about Salesforce CLI topics and their
commands.</shortdesc>
<title>Help for <codeph otherprops="nolang">sf</codeph> Commands</title>
<shortdesc>The <codeph otherprops="nolang">-h</codeph> and <codeph otherprops="nolang"
>--help</codeph> flags show details about <codeph otherprops="nolang">sf</codeph> topics and
their commands.</shortdesc>
<prolog>
<metadata>
<othermeta content="concept" name="topic_type"/>
Expand All @@ -23,56 +23,43 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
</metadata>
</prolog>
<conbody>
<p>For namespaces, the <codeph otherprops="nolang">-h</codeph> | <codeph otherprops="nolang"
>--help</codeph> parameter lists all topics in the namespace. For example, to see names and
descriptions of all topics in the <codeph otherprops="nolang">force</codeph> namespace, run
<codeph otherprops="nolang">sfdx force -h</codeph>.</p>
<p>For topics, the <codeph otherprops="nolang">-h</codeph> | <codeph otherprops="nolang"
>--help</codeph> parameter lists the commands and their descriptions. For example, to see
all commands in the <codeph otherprops="nolang">org</codeph> topic, run <codeph
otherprops="nolang">sfdx force:org -h</codeph>.</p>
<p>For commands, adding the <codeph otherprops="nolang">-h</codeph> | <codeph otherprops="nolang"
>--help</codeph> parameter shows parameters and usage information. For example, to see help for
the <codeph otherprops="nolang">org:create</codeph> command, run <codeph otherprops="nolang">sfdx
force:org:create -h</codeph>.</p>
<p>Help for commands has four parts.<ol>
<p>The short <codeph otherprops="nolang">-h</codeph> flag shows a subset of the command-line
help and is meant for quick reference. The long <codeph otherprops="nolang">--help</codeph>
flag shows the complete command-line help. </p>
<p>The short help (<codeph otherprops="nolang">-h</codeph>) for commands has these parts.<ol>
<li><b>Short Description of Command</b><p>At the top of the <codeph otherprops="nolang"
>--help</codeph> output (with no heading), a short description of the command is
shown. For longer descriptions, see the <cite>Salesforce CLI Command
Reference</cite>.</p></li>
>-h</codeph> output (with no heading), a short description of the command is shown.
</p></li>
<li><b>Usage</b><p>The command signature on the Usage line uses the docopt format.<ul>
<li>All available parameters are listed. Parameters that have short names are listed
using their short names.</li>
<li>Parameters that take a value show the value’s type (for example, <codeph
otherprops="nolang">&lt;string></codeph>) in angle brackets immediately after the
parameter’s name.</li>
<li>Optional parameters are in square brackets (<codeph otherprops="nolang">[ …
]</codeph>).</li>
<li>Required parameters have no annotation.</li>
<li>For parameters that accept a limited set of values, the values are shown after the
parameter name, separated by pipes (<codeph otherprops="nolang">--parametername
<li>All available flags are listed. Flags that have short names are listed using their
short names.</li>
<li>Flags that take a value show <codeph otherprops="nolang">&lt;value></codeph>
immediately after the flag’s name.</li>
<li>Optional flags are in square brackets (<codeph otherprops="nolang">[ …
]</codeph>).</li>
<li>Required flags have no annotation.</li>
<li>For flags that accept a limited set of values, the values are shown after the flag
name, separated by pipes (<codeph otherprops="nolang">--flagname
value1|value2|value3</codeph>).</li>
<li>Mutually exclusive options are shown in parentheses, separated by a pipe (<codeph
otherprops="nolang">( … | … )</codeph>).</li>
</ul></p><p>If the command takes varargs (name-value pairs that aren’t parameters), the
usage signature includes <codeph otherprops="nolang">name=value...</codeph>.</p><note
type="tip">To see all Salesforce CLI commands, run <codeph otherprops="nolang">sfdx
commands</codeph>.</note></li>
<li><b>Options</b><p>The Options section lists all the command’s parameters, including their
short name, long name, and purpose. For parameters that accept a value, the value name
is written after an equals sign (<codeph otherprops="nolang">=</codeph>). The equals
sign is optional when you run the command—for example, you could run <codeph
otherprops="nolang">sfdx force:org:create
<varname>-f=config/enterprise-scratch-def.json</varname> -a TestOrg1</codeph> or
<codeph otherprops="nolang">sfdx force:org:create <varname>-f
config/enterprise-scratch-def.json</varname> -a TestOrg1</codeph> with the same
results.</p><p>Parameters that accept a limited list of values include the values in
parentheses, with the default value indicated by an asterisk (<codeph
otherprops="nolang">*</codeph>).</p><p>For more information about the parameters, see
the <cite>Salesforce CLI Command Reference</cite>.</p></li>
<li><b>Description</b><p>Usage notes and examples are below the list of parameters, in the
Description section. This information is also available in the <cite>Salesforce CLI
Command Reference</cite>.</p></li>
</ul></p></li>
<li><b>Flags</b><p>The Flags section lists all the command’s flags, including their short
name, long name, and purpose. Flags are grouped for easier reading, such as global flags
and other groups relevant to a specific command. </p><p>For flags that take multiple
values, you have two ways to specify the values:<ul>
<li>Specify the flag multiple times, where each flag takes a different single
value.</li>
<li>Specify the flag one time, but separate all the values with a space.</li>
</ul></p><p>For example, the following commands are
equivalent:<codeblock otherprops="nolang">sf deploy metadata --metadata ApexClass --metadata CustomObject --metadata AnotherCustomObject
sf deploy metadata --metadata ApexClass CustomObject AnotherCustomObject</codeblock></p><p>Flags
that accept a limited list of values include the values in parentheses, with the default
value specified with the <codeph otherprops="nolang">default</codeph> keyword. </p></li>
</ol></p>
<p>The long help (<codeph otherprops="nolang">--help</codeph>) for commands has the same parts
as the preceding short help <codeph otherprops="nolang">-h</codeph>) and these additional parts.<ol>
<li><b>Description</b><p>Usage notes. </p></li>
<li><b>Examples</b><p>All examples include a brief description.</p></li>
<li><b>Flag Descriptions</b><p>Some flags have optional additional usage notes.</p></li>
</ol></p>
</conbody>
</concept>
9 changes: 4 additions & 5 deletions templates/cli_reference_xml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D

-->
<!--This is a static file that should be passed as-is through the autogen process.-->
<title>Salesforce CLI Command Reference</title>
<shortdesc>The command reference contains information about the Salesforce CLI commands and
their parameters. </shortdesc>
<title>sf</title>
<shortdesc>This section contains information about the <codeph otherprops="nolang">sf</codeph> commands and their parameters. </shortdesc>
<prolog>
<metadata>
<othermeta content="reference" name="topic_type"/>
Expand All @@ -24,8 +23,8 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
</prolog>
<refbody>
<section>
<p>This version of the command reference includes details about version
{{cliVersion}} of Salesforce CLI and the following plug-in versions:</p>
<p>This version of the <codeph otherprops="nolang">sf</codeph> command reference includes details about version
{{cliVersion}} of the <codeph otherprops="nolang">sf</codeph> executable of Salesforce CLI and the following plug-in versions:</p>
<ul>
{{#each pluginVersions}}
<li><codeph otherprops="nolang">{{name}}</codeph> version {{version}}</li>
Expand Down
7 changes: 4 additions & 3 deletions templates/command.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
format="html" scope="external" type="new-window:HTML">{{trailblazerCommunityName}}</xref> group in the
Trailblazer Community.</note>
</section>{{/if}}{{#if isOpenPilotCommand}}
</section>{{/if}}{{#if isOpenPilotCommand}}
<section>
<note>We provide the <codeph otherprops="nolang">{{name}}</codeph> command to selected customers through a pilot program
that requires agreement to specific terms and conditions. To be nominated to participate
Expand All @@ -58,7 +59,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
</section>{{/if}}
{{#if help}}
<section>
<title><ph>Help for <codeph otherprops="nolang">{{name}}</codeph></ph></title>
<title><ph>Description for <codeph otherprops="nolang">{{name}}</codeph></ph></title>
{{#each help}}
{{#isCodeBlock this}}<codeblock otherprops="nolang">{{this}}</codeblock>{{else}}<p>{{this}}</p>{{/isCodeBlock}}
{{/each}}
Expand All @@ -78,7 +79,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
</section>
{{/if}}
<section>
<title><ph>Command Syntax</ph></title>
<title><ph>Usage</ph></title>
<dl>
<dlentry>
<dt><codeph otherprops="nolang">{{binary}} {{name}}</codeph></dt>
Expand All @@ -90,7 +91,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
</section>
{{#if parameters}}
<section>
<title><ph>Parameters</ph></title>
<title><ph>Flags</ph></title>
<dl>
{{#each parameters}}
<dlentry>
Expand Down
2 changes: 1 addition & 1 deletion templates/topic_ditamap.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ THIS FILE IS AUTOGENERATED. DON’T MAKE CHANGES TO THIS FILE IN PERFORCE! YOUR
IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR DETAILS.

-->
<title><codeph otherprops="nolang">{{topic}}</codeph> Namespace</title>
<title><codeph otherprops="nolang">{{topic}}</codeph> Commands</title>
<topicref href="{{xmlFile 'cli_reference' topic 'commands'}}" type="concept" format="dita" scope="local" chunk="to-content" collection-type="unordered">
{{#each commands}}
<topicref href="{{xmlFile 'cli_reference' command}}" type="reference" format="dita" scope="local"/>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/endtoend.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ describe('plugin-login', () => {
});
it('creates parameters', async () => {
const dita = loadTestDitamapFile(join('login', 'cli_reference_login_org_jwt_unified.xml'));
expect(/<title><ph>Parameters<\/ph><\/title>/.test(dita)).to.be.true;
expect(/<title><ph>Flags<\/ph><\/title>/.test(dita)).to.be.true;
});
});