You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

命令调用语法及脚本调用模板规范咨询(含参数符号释义)

Command Invocation Syntax 101

First, let's confirm the standard symbols widely used in command line documentation (like man pages, tool guides, and CLI help text) to describe invocation templates:

  • <parameter>: Marks a required parameter that must be provided when running the command. The placeholder inside (e.g., argument_1) tells you what the parameter represents.
  • [parameter]: Indicates an optional parameter—you can choose to include it or omit it depending on your needs.
  • {value1, value2, ...}: Denotes a restricted set of mutually exclusive values a parameter can accept. This is used when the parameter can only take specific, predefined options (not arbitrary input).
  • |: Sometimes used as shorthand for "or" between mutually exclusive options (e.g., true|false), but curly braces are more explicit for listing valid values clearly.

Correct Invocation Template for do_something

Based on your command's requirements, here's the standard, convention-aligned template:

do_something <argument_1> {true, false} [argument_3]

Let’s break this down to match your specs exactly:

  1. <argument_1>: Required, accepts any value—angle brackets signal it’s mandatory with no fixed value restrictions.
  2. {true, false}: Required for argument_2—curly braces list the only valid values this parameter can take, and since it’s mandatory, there’s no surrounding square brackets.
  3. [argument_3]: Optional parameter—square brackets mean you can leave this out entirely if you don’t need it.

For extra clarity (if you want to explicitly tie the value list to the parameter name), you could also write:

do_something <argument_1> <argument_2={true, false}> [argument_3]

Both forms are acceptable, but the first is more concise and matches common man page formatting.

内容的提问来源于stack exchange,提问作者fguillen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:15:05