Skip to content

Commit 2b084a3

Browse files
committed
Clarity for commands vs global options
While reviewing the `global options` section in `runtime.md`, it seemed additional clarity was needed for the `command` and `global options` requirements. Discussed and worked on wording with @wking via private IRC. Also adds uppercase RFC 2119 words for this section. With regard to the statement `Command names MUST not start with hyphens,` the rationale behind this decision is to "distinguish unrecognized commands from unrecognized options, and because we are "requiring runtimes to fail-fast for unrecognized commands" [1,2]. `[1]` https://github.com/wking/oci-command-line-api/pull/8/files#r46898167 `[2]` 527f3c6#commitcomment-14835617 Signed-off-by: Mike Brown <[email protected]>
1 parent 933b55d commit 2b084a3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

runtime.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ $ funC [global-options] <COMMAND> [command-specific-options] <command-specific-a
99

1010
## Global options
1111

12-
None are required, but the runtime may support options that start with at least one hyphen.
13-
Global options may take positional arguments (e.g. `--log-level debug`), but the option parsing must be such that `funC <COMMAND>` is unambiguously an invocation of `<COMMAND>` for any `<COMMAND>` that does not start with a hyphen (including commands not specified in this document).
12+
None are required, but the runtime MAY support options that start with at least one hyphen.
13+
Global options MAY take positional arguments (e.g. `--log-level debug`).
14+
Command names MUST not start with hyphens.
15+
The option parsing MUST be such that `funC <COMMAND>` is unambiguously an invocation of `<COMMAND>` (even for commands not specified in this document).
16+
If the runtime is invoked with an unrecognized command, it MUST exit with a nonzero exit code and MAY log a warning to stderr.
1417

1518
## Character encodings
1619

0 commit comments

Comments
 (0)