Source: ViewEdit

Command namespace and context requests

Concept, proposed. Nothing here is part of The Standard yet. Rule ids (NS-n) are provisional and may change before any part is adopted.

Today a shell gives commands their context in three implicit ways: it finds them by searching the folders on PATH, it hands every process the current folder whether or not it needs one, and it "activates" environments by editing variables in the session. This page proposes replacing all three with explicit models: a hierarchical command namespace, input signatures that say which context a command will request, and named isolation levels for anything that changes the namespace for a while.

The key words MUST, SHOULD and MAY follow BCP 14.

Why change

  • PATH is a flat list searched in order. Every command competes for one name; the winner is decided by folder order that installers edit and users cannot see; nothing records who put a name there or which version it is.

  • The current folder is ambient. It is printed before the prompt as if it were part of every command, and every process inherits it. The user cannot tell before pressing Enter whether a command will act on it.

  • Activation is a hidden edit. A Python venv is a persistent folder; activate only edits PATH, VIRTUAL_ENV and the prompt for one session. The edit is invisible except for a prompt prefix, and the word "environment" hides what actually changed. See Virtual environments are neither virtual nor temporary.

Programming languages solved the first problem long ago with modules and qualified names. The context a person works in should come from what they want to do, not from which folder they are in.

Command namespace

NS-1

A conforming shell MUST resolve the first word of a command through a hierarchical command namespace, not by searching folders. Nodes are slash-separated paths of lowercase words grouped by task, for example install, install/npm, vcs/status.

NS-2

A tool MUST enter the namespace by a registration manifest that names every node it claims, its package, version and publisher. The shell host MUST record each registration (who, what, when). Manifests are written in JSON5 and validated by JSON Schema after parsing (see command-namespace).

NS-3

Two manifests claiming the same node MUST be reported as a conflict. The shell MUST NOT let the most recent installer win silently.

NS-4

An unknown first word MUST be a usage error with did-you-mean across the namespace, as CLI Dispatch CD-1 requires of a single tool.

NS-5

Running a file by path MUST stay possible, but only explicitly (a path-shaped token or a run command). A shell MAY import PATH as a read-only legacy subtree during migration and MUST mark commands resolved that way.

NS-6

A node MUST declare its CLI style (strict by default, per CLI Styles CS-1 and CS-2). A resolver-style front door such as install is a node whose children are providers registered by each package manager. The command is literally install, to keep the interface seamless; on Unix the existing install(1) file copier is registered at legacy/install, and install(1)-style arguments are handed through to it so build scripts keep working (passthrough PROVISIONAL).

NS-7

A tool SHOULD publish its own token table (subcommands, contextual flags, free flags) in its manifest and SHOULD use the same table in its own parser. This lets inspection tools list commands, flags, conflicts and installed packages across every manager without running any command or its help. Free flags are non-contextual: they mean the same in every command, use the + sigil, and their order doesn’t matter (+yes +verbose); repeating the sigil steps through levels. Contextual flags use -: their meaning depends on the verb and their position matters (install -npm <pkgname>), and their spelling follows NS-15 (Option syntax (NS-15)). The inspection tool is name (name which, name conflicts).

NS-8

When a version manager controls a node, the manifest for each version SHOULD mark which commands and flags were added, removed or changed since the previous release. This is a visual cue and learning aid, not a full diff.

Context requests

NS-9

A command node SHOULD publish an input signature declaring which ambient context it will request: current folder (none, read, write, and under which flags), named environment variables, identity, network and stdin.

NS-10

A shell MUST give a command the current folder only when its signature requests it (native protocol), and SHOULD show, before the command runs, whether the folder will be used. A command with no signature MUST be shown as "may use current folder".

NS-11

The current folder SHOULD be displayed as an input at the end of the command line, truncated to at most half the screen width, with a setting to keep the leaf folder at the right or left edge of its slot.

NS-12

The command composition area SHOULD keep a fixed height of two to three lines (context, input, transient status) so that status shown while typing does not move the input line. This extends the two-line layout in Prompt spatial layout and the multi-line paste preview in Shell display layers.

Isolation levels

NS-13

Anything that changes the namespace or the process’s view of the system for a while SHOULD be described by three properties: level (overlay, fence, partition, guest), lifetime (run, session, kept), and scope (process, session, folder, user, machine). Definitions: Isolation levels (Dev-Centr glossary).

NS-14

An overlay (venv activation, a version switch, a project pin) SHOULD be implemented as a layer on top of the command namespace, with precedence machine < user < folder < session, and MUST be shown in the composition area with its full term, for example "kept overlay: .venv, attached to this session".

Option syntax (NS-15)

NS-15

A conforming tool’s own options MUST use a single dash (-), read by these rules. - options are the contextual flags of NS-7: their meaning depends on the verb and their order matters (install -npm <pkgname>). The rules apply to any argument that starts with - and is not exactly - (a switch; bare words are values or bare-word nodes, Token kinds and bare-word nodes (decided)); the + free (non-contextual) flags of NS-7 are not affected.

  1. -word is a long option. A word is two or more characters, and hyphenated words are allowed: -version, -dry-run, -strict-dispatch.

  2. A short alias is a single letter: -v. A short alias and a long option MAY name the same option (-v and -version).

  3. There is no implicit bundling. -xvz MUST be read as the long option named xvz, never as -x -v -z.

  4. Explicit grouping is single letters joined by hyphens: -x-v-z means the switches x, v and z. Every part of a group MUST be one letter.

  5. A long option name MUST NOT start with a single letter followed by a hyphen (-d-lang, -f-stop, -f-number); spell it -dlang, -fstop, -fnumber. A token that starts like a group and continues with a longer word (-d-lang, -x-dry-run) MUST be a usage error (CD-8: stderr, exit 2).

  6. A lone - is an operand, not an option (stdin or stdout, as in -f -), and MUST stay legal.

    --long is a deprecated legacy alias, scheduled for deletion in the next major revision of the standard; frameworks MUST warn about it at build time and at run time (--long is a deprecated legacy alias (decided)). Repeated dashes (--x, ---x) are reserved for a future meaning, which is OPEN (Repeated - is reserved (OPEN)). Documentation and examples MUST use the single-dash form.

    DECIDED 2026-12-05 (Ryan): in Plus Shell native syntax the -- prefix is retired (The -- prefix is retired in Plus Shell native syntax (decided)). Native syntax has no --long, no --x / ---x depth and no bare -- end-of-options marker; the legacy-shell rules above are unchanged. The legacy form of records and nesting uses / as the separator (Slash namespace separator (decided)).

Grammar

Split the text after the leading - on - into parts. The first part decides:

token   = "-"                              ; operand (stdin/stdout), NS-15 item 6
        | "-" letter                       ; short alias            -v
        | "-" letter 1*("-" letter)        ; explicit group         -x-v-z
        | "-" word *("-" part)             ; long option            -version, -dry-run, -xvz
        | "--" ...                         ; legacy shells only: deprecated alias of "-"; retired in Plus Shell native (see below)
        | "-" word 1*( "/" key )           ; legacy form of a record or nested option, -video/codec (see "Slash namespace separator")
key     = word
letter  = %x61-7A / DIGIT                  ; one character
word    = 2*( %x61-7A / DIGIT )            ; two or more characters
part    = 1*( %x61-7A / DIGIT )
; anything else whose first part is one letter
; (a letter, then a part of two or more characters) is a usage error

Later one-letter parts inside a long name (-ipv-4) are legal; only the first part decides between group and long name.

OPEN: Ryan has not decided whether -ipv-4 style names are allowed. Until he does, the grammar above stands and they are legal.

Examples

Token Legal? Meaning, or the error (stderr, exit 2, CD-8)

-version

yes

long option version

-dry-run

yes

long option dry-run

-v

yes

short alias v (MAY be the same option as -version)

-x-v-z

yes

switches x, v and z

-xvz

yes

long option xvz. If the tool has no such option: error: unknown option '-xvz' / ` to pass -x, -v and -z, write: -x-v-z` / ` see: <tool> -help`

-f -

yes

-f with the operand - (stdin or stdout)

-fstop

yes

long option fstop

-f-stop

no

error: invalid option '-f-stop': a one-letter part followed by '-' starts a group / ` did you mean: -fstop, or -f -stop` / ` see: <tool> -help`

-d-lang

no

same error; did you mean -dlang

-x-dry-run

no

error: invalid option '-x-dry-run': mixes the switch -x with the long option -dry-run / ` write: -x -dry-run` / ` see: <tool> -help`

--help

deprecated

legacy alias of -help if the tool still accepts it; warns on stderr (use: <tool> -help); scheduled for deletion in the next major revision of the standard

---help

reserved

no meaning yet (OPEN); a tool MUST NOT define one

Why

  • Bundling reads as a word. tar’s -xvz packs three switches into something that looks like a command named xvz ("what is xvz, are we x-vizzing it?"). Under NS-15 a token always means what it spells.

  • Grouping needs a visible separator that survives every shell. A colon (-:xvz) never reads as grouping; quotes (-"xvz") are stripped by the shell; ; ends a command; parentheses need quoting in bash and PowerShell. A hyphen between single letters is plain, typeable and unquoted everywhere.

  • Letter-hyphen names are ambiguous. Cabal’s -f-foo means "disable flag foo", which is exactly the -f -foo versus -f-foo ambiguity this rule removes; GHC avoids it with -fno-foo and -XNoFoo. Banning a leading letter-hyphen keeps every group unambiguous.

Token kinds and bare-word nodes (decided)

Decided 2026-10-26 (Ryan). A FreeCLI command line has exactly three kinds of token:

  1. Switches: tokens that start with - (and are not exactly -), read by the NS-15 rules above (-version, -v, -x-v-z). The + free flags of NS-7 are a separate sigil and are unchanged.

  2. Values: bare strings, such as operands and option arguments (<pkgname>, file.txt, the - operand).

  3. Bare-word nodes: subcommands such as help and commit, written without a sigil.

Resolution rule. A bare word is a node only where the command namespace declares a node with that name at that position (the path read so far, NS-1, NS-7). Anywhere else, a bare word is a value. A parser and a linter MUST resolve bare words against the namespace this way; a bare word MUST NOT be treated as a switch or flagged as an illegal NS-15 token.

This keeps <command> help valid alongside -help, and reconciles CH-2 with NS-15: help is a declared bare-word node, while -help is the switch of CH-1.

Order and scope (DECIDED 2026-10-26, Ryan). Bare-word nodes impose a fixed order, and each node narrows scope: everything after a node is interpreted inside it. In git remote add -name x, remote is read inside git, add inside git remote, and -name x is a switch and value of git remote add.

PROPOSED (not decided) corollaries:

  • + free flags float only within their declaring scope, never above it: a free flag declared by git remote may appear anywhere after remote, but not before it.

  • No scope re-entry: once a node has narrowed scope, a later token cannot return to an outer scope.

Command line Reading

git commit -amend

commit is a declared node under git; -amend is a switch

help git commit

shell-level help: help is the node; git and commit are values naming the namespace path git/commit (decided)

git help commit

compatibility path: help is a declared node under git; commit is a value naming the path, and the same help resource is served

help-checker : help

: makes help the implied positional input, a file named help, not the help node

install : help

: makes help a value: installs a package named help

install :: help commit

:: escapes the rest of the line: help and commit are both package names

encode -output "-final.mkv"

in plush, double quotes mark a hyphen-leading value; bare -final.mkv is banned as an input value (DECIDED 2026-11-29)

redub help

help is a node if redub declares it (CH-2 requires it); otherwise help is a value, a package named help

install -npm help

if install/npm declares no help node at that position, help is the value (a package name)

echo commit

echo declares no nodes, so commit is a value

Value escape (DECIDED 2026-10-26, Ryan). A colon token means "treat the following as a value". Its main use is the implied positional input, when a value collides with a declared bare-word node name: help-checker : help checks a file named help, and install : help installs a package named help. It is not -- and not a value prefix.

Scope (DECIDED 2026-10-26, Ryan). A lone : escapes exactly the next token. A lone :: escapes the rest of the line, and naturally stops at a pipe, because the shell ends the command there.

Why not quotes in legacy shells. Legacy shells (bash/zsh) strip quotes before building argv, so install "help" and install help reach the tool as the same argument. In those shells, quoting cannot tell a node from a value; only a token the tool itself sees can.

Hyphen-leading values (DECIDED 2026-11-29, Ryan). Bare hyphen-leading tokens are banned as input values. In plush, a hyphen-leading value MUST be written in double quotes (-output "-final.mkv" instead of -output : -final.mkv), which is visually clearer than :. In legacy shells (bash/zsh) where quotes are stripped before argv, positional hyphen-leading values still fall back to : or ./. Future shell scripting SHOULD pass structured data instead of relying on text-based string parsing.

Switch values (DECIDED 2026-10-26, Ryan; reverses the earlier = rule). Hyphen switches take their values space-separated, never with =, for predictability. ls -r -depth 5 Z:/code is the headline example: -r is a plain switch, -depth is a value switch whose value is 5, and Z:/code is the operand. Because the namespace says -depth takes one value and -r takes none, nothing is ambiguous.

Switch kinds (conceptual). The function-like versus variable-like distinction stays as a way to think about switches, but it no longer changes the syntax:

  • Function-like switches modify what the command does. install -npm <pkgname> is the switch -npm followed by the operand <pkgname>: in Ryan’s words, npm isn’t a variable assigned the value antora.

  • Variable-like switches set a value: -output out.mkv, -depth 5.

Both are written the same way; what matters to the parser is the arity the namespace declares.

PROPOSED: fixed arity. The namespace declares each switch’s arity, and there are no optional values. A plain switch takes 0 values; a value switch takes exactly 1, space-separated (like PowerShell’s -Recurse and -Depth 5). The one exception is DECIDED (2026-12-05): a switch declared with the schema level type takes 0 or 1 value, and the parser takes the next token as its value only if that token is in the declared level enum (Intensity is a level value (decided)). The enum, not position, resolves the tension with fixed arity: -clean alone is the tool’s default level, -clean 2 is level 2, and -clean Makefile is a bare -clean followed by an operand. Fixed arity is about switch/operand predictability, not about disambiguating hyphen-leading values (which are handled by the double-quote rule above). A fuller taxonomy based on programming-language elements may come later.

PROPOSED: bare assignment. A bare name=value token, with no hyphen, as in dd if=disk.img and make CC=clang. It is recognized only when the namespace declares name as an assignment at that position; anywhere else the token is a value, and : forces a value. Caveats: it breaks the earlier idea that variables carry a -, and a value that itself contains = (key=a=b, a URL query) needs a defined split rule (first = only) or :.

Existing examples, classified. All stay space-separated.

Example (where) Kind Note

install -npm <pkgname> (NS-7, NS-15, repeated-dash section; command-namespace spec.adoc, provisional.adoc, CHANGELOG.adoc)

function-like

a switch, then an operand

install --prefer-npm prettier (provisional.adoc, repeated-dash row)

function-like

prettier is the operand of install

vcs --verbose status (provisional.adoc, repeated-dash row)

function-like

no value; status is a node

install -clean, --clean, ---clean (danger gate)

function-like

no value

<tool> -strict zzqx (CLI Dispatch certification)

function-like

no value; zzqx is an unknown command

git remote add -name x (order and scope, above; changelog; command-namespace spec.adoc)

variable-like

value switch, 1 value

-output out.mkv in encode -codec x264 --crf 23 --preset slow -output out.mkv (changelog; provisional.adoc, hierarchy candidate)

variable-like

value switch, 1 value

--crf 23, --preset slow (same example; encode --crf 23 in the hierarchy candidate)

variable-like

value switches; children of -codec under the OPEN hierarchy candidate

-codec x264 (same example)

OPEN

a value switch, but also the parent of --crf and --preset under the hierarchy candidate. Suggestion (not decided): a third kind, a scoped variable, that both takes a value and opens a scope for the child switches after it (-codec x264 --crf 23)

Help paths (DECIDED 2026-10-26, Ryan). Help is help-first. The primary mode is shell-level help <path> (prohelp), which serves help for every command from the help resources tools ship. Under shell-level help the path tokens are values naming a namespace path: in help git commit, git and commit are values. <command> help and -help are compatibility paths to the same resource.

Prohelp today: prohelp keeps its <command> help and <command> ? syntax for now (decided for now, may revisit). help as a node already meets CH-2, and shell-level help <path> is the primary mode; ? and the lack of -help remain the FreeCLI deviations.

Slash namespace separator (decided)

Status: DECIDED (Ryan, 2026-12-05). / is the generic namespace separator for the legacy form of records and nesting ("works well for us"). It replaces dotted names. A nested option is written -video/codec x264, not -video.codec x264. The same separator joins node paths in the namespace (NS-1, git/commit) and the mode on the help node and switch (help/i, -help/i, CH-27).

Why not dotted. Measured 2026-12-05 on Windows PowerShell 5.1.26100 and PowerShell 7.7.0: an unquoted -video.codec x264 reaches a native program as three arguments, -video, .codec and x264. D Lang reproduced it independently with cmd /c echo -video.codec x264 -help.mode interact, which printed -video .codec x264 -help .mode interact in both versions. -video/codec x264 and -video_codec arrived unchanged; -video,codec is a PowerShell parse error. / is a literal character in bash, zsh, fish, cmd and PowerShell, and it matches the deep-link topic paths (git/commit/options).

nested-switch = "-" word 1*( "/" key )     ; -video/codec, -video/filters/scale
key           = word                       ; the NS-15 word rule: lower case, digits, hyphens between parts
; the first segment decides group-versus-long-name exactly as in the NS-15 grammar
; no empty segment, no leading or trailing "/", no "//"

Rules.

  1. A conforming tool or parser MUST read -video/codec x264 as the option whose namespace path is video/codec with the value x264. The path is resolved against the tool’s declared options (NS-7) the way a node path is resolved in the command namespace (NS-1).

  2. The first segment MUST be at least two letters. A tool MUST NOT declare a one-letter option, or a one-letter alias, that takes /key children (-v/codec, -h/i): on Git Bash and MSYS2 those arguments are rewritten before the tool sees them (below).

  3. An empty segment (-video//codec, -video/) and an unknown key (-video/codc) are usage errors under CD-8: name the token, give a did-you-mean over the declared keys, point to help, stderr, exit 2.

  4. Only the switch token is split. A value is never read for /: -output out/final.mkv has the value out/final.mkv.

  5. A tool MUST NOT accept the dotted spelling (-video.codec) as an alias; the dotted form is not part of the standard.

Lowering from native records and lists (Plus Shell lowers its structured line to this flat argv before it starts a tool, so tools only ever parse flat argv; the schema-first seed has the full table):

Native (Plus Shell) Lowered argv Status

record -video {codec: x264, crf: 20}

-video/codec x264 -video/crf 20

DECIDED (one option per leaf, / joins the path)

nested record -video {filters: {scale: 1.5}}

-video/filters/scale 1.5

DECIDED

list -tag [a, b]

-tag a -tag b (the option repeated)

DECIDED

list inside a record -video {tags: [a, b]}

-video/tags a -video/tags b

PROPOSED (follows from the two rows above)

boolean field -video {deinterlace: true}

-video/deinterlace when the field has arity 0, -video/deinterlace true when it is declared arity 1; a false on an arity-0 field is omitted

PROPOSED

quoted hyphen-leading value -title "-final.mkv"

-title : -final.mkv (the : escape; ./-final.mkv for a path-typed option)

DECIDED (2026-11-29)

structured help -help {mode: interact, lang: de}

-help/i -lang de

PROPOSED (the mode registry of CH-27 supplies the short spelling)

Leaves are emitted in the order they are written in the record. PROPOSED. An empty record emits nothing. A tool never receives a record, only the flat argv; whether the shell also offers a structured channel is OPEN (schema-first seed, D7).

MSYS and Git Bash: long forms only. When a native Windows program is started from Git Bash or MSYS2, an argument that looks like a Unix path is converted before the program runs (MSYS2 filesystem paths, "Automatic Unix to Windows Path Conversion", process arguments; the rules live in find_path_start_and_type of git-for-windows msys2_path_conv.cc). Measured 2026-12-05 on Git Bash (MSYS 3.6.10) and MSYS2 bash (3.6.3), conversion on, with a native argument printer:

Typed Arrives Verdict

-video/codec, -video/filters/scale, help/i, help/interact, -help/i, -help/interact

unchanged

safe: two or more letters before the /

-h/i

-hI:/

rewritten: one letter then /

-h/interact, -v/codec

-hC:/Program Files/Git/interact (Git Bash), -hC:/msys64/interact (MSYS2); -vC:/Program Files/Git/codec

rewritten

/i

I:/

rewritten: a single letter after a leading / is a drive

So documentation, help and completions MUST show only the long forms (two letters or more before /), and a tool MUST NOT define one-letter options with /key children. Users can switch the conversion off (MSYS2_ARG_CONV_EXCL, or MSYS_NO_PATHCONV set to any value in Git for Windows), but the standard MUST NOT depend on that. Values that are themselves Unix-looking paths (-output /tmp/x) are converted by the same rule regardless of this separator; that is a shell fact for each tool’s CH-28 page.

Visual overlap. Many cmd.exe and Win32 tools use a leading / as their switch sigil (/i, /s). help/i and -help/i do not start with /, so they are not Windows switches, but a reader can mistake them for one.

A leading / is reserved for paths (DECIDED, Ryan, 2026-12-05). A token that starts with / is a path (or, for a legacy tool, one of its own Windows-style switches). A conforming shell or parser MUST NOT give such a token any other meaning: no built-in command, no language switch, no mode. Real paths win. The earlier idea of a /en input-language built-in was considered and dropped for this reason (Input language, Not adopted). The infix / of this section and a leading / are different positions and do not interact: -video/codec is a switch with a namespace path; /video/codec is a path.

The -- prefix is retired in Plus Shell native syntax (decided)

Status: DECIDED (Ryan, 2026-12-05). In Plus Shell’s native (oso) syntax there are no -- tokens: no GNU-style --long, no --x / ---x repeated-dash depth or intensity, and no bare -- end-of-options marker. Scope comes from the schema and from where a token sits, not from how many dashes it has; hyphen-leading values are quoted (-output "-final.mkv", DECIDED 2026-11-29).

  • Legacy shells are unchanged. On the legacy path --long stays a deprecated alias with the warnings of --long is a deprecated legacy alias (decided) until its removal date, and a bare -- may still end options there. Tool libraries keep accepting it with a warning; positional hyphen-leading values still fall back to : or ./.

  • Effect on the candidates below. Candidate A (intensity by repeated dashes) and Candidate B (hierarchy by dash depth) both need repeated dashes, so neither applies to native syntax. Candidate B’s job is done by records and the / form above; intensity is a level value (Intensity is a level value (decided); the ! suffix survives only as an optional Plus Shell shorthand, Intensity suffix ! (optional Plus Shell shorthand; no ~ fallback)). Whether the legacy text of Candidate B is formally withdrawn, or kept until a prototype of records exists, is OPEN (schema-first seed, D19).

  • Considered and rejected, not decided: modifier tokens spelled --1 to --9, --low, --med, --high and --0. They depend on the retired prefix and are not adopted.

  • DECIDED (Ryan, 2026-12-05): an intensity level is the switch’s own value (-clean 2, -clean high, -verbose 0, with a shared level type of 0 to 9 plus low / med / high, 0 meaning off). It replaces repeated-switch and dash-count intensity. See Intensity is a level value (decided).

Intensity is a level value (decided)

Status: DECIDED (Ryan, 2026-12-05, relayed by D Lang). A switch’s intensity is its own typed value, not a count of dashes, a repeated switch or a suffix character. The value type is a shared, schema-declared level type. This REPLACES repeated-switch intensity (-v -v -v), hyphen-count intensity (--x, ---x; Candidate A below) and the ! / !! suffix as the intensity mechanism. The ! / !! suffix remains only as an optional Plus Shell shorthand (Intensity suffix ! (optional Plus Shell shorthand; no ~ fallback)), marked OPEN as to how it maps onto levels.

level-switch = "-" name [ SP level ]       ; the value is optional, and only for level-typed switches
level        = digit / "low" / "med" / "high"   ; the closed enum, as the schema narrows it for this switch
digit        = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
  1. Type (DECIDED). The schema type level accepts 0 to 9 and the words low, med and high. A switch MAY declare a narrower subset (for example 0, 1, 2, high). The words are case-sensitive and lower case. A tool MUST reject, or parse as an operand (rule 3), any other token.

  2. Zero (DECIDED). 0 means disabled, for any option that normally starts at 1: -verbose 0 turns verbosity off, -clean 0 turns cleaning off. A level switch that is absent is the tool’s own default, which is not necessarily the same as 0.

  3. Arity (DECIDED). A level switch takes 0 or 1 value. The parser takes the next token as the value if and only if that token is in the switch’s declared level enum. Otherwise the switch stands alone at the tool’s default level (typically 1) and the token is whatever it would have been anyway (a node, a switch or an operand). So -clean 2 and -clean high are levels, -clean Makefile is -clean plus an operand, and -clean 12 is -clean plus the operand 12 (a tool that takes no operands then reports unexpected operand '12' with the hint levels are 0 to 9, low, med, high, CD-8, exit 2). This is the only exception to fixed arity ([switch-kinds]), and the closed enum is what keeps it unambiguous. -clean=2 is a usage error as for any hyphen switch.

  4. Order (DECIDED). The value follows its switch immediately. It is never glued (-clean2 is an unknown option) and never a separate modifier token.

  5. Shells (DECIDED). The level value contains no special character in any listed shell, so it needs no per-shell rule and no entry on a compatibility page (CH-28).

  6. Legacy argv (DECIDED). The flat argv is the same as the native form: -clean 2. Nothing is lowered.

Table 1. Level examples
Line Meaning

vcs -verbose

-verbose at the tool’s default level (typically 1).

vcs -verbose 3

Level 3.

vcs -verbose 0

Verbosity off.

install -clean high ripgrep

Level high; ripgrep is the operand.

install -clean ripgrep

Bare -clean; ripgrep is not in the enum, so it is the operand.

install -clean 2

Level 2, no operand. A tool that requires an operand reports a missing operand (CD-8), not a bad level.

OPEN, for the schema-first seed: how -clean!! (the shorthand) maps onto a level (D16); whether the spelled-out form -clean/level 2 also stays (D17); the numeric value of the words (whether low, med and high are fixed numbers such as 1, 5 and 9 or only ordered labels per tool); and how to pass an operand that is itself a level word immediately after a level switch (put the operand before the switch, or quote it; not specified here).

--long is a deprecated legacy alias (decided)

Status: Decided (legacy path). In Plus Shell native syntax the -- prefix is retired altogether (The -- prefix is retired in Plus Shell native syntax (decided)); this section is the rule for legacy shells and tool libraries. --long (GNU style) is a deprecated legacy alias of -long, scheduled for deletion in the next major revision of the standard. Repeated dashes (--, ---) are reserved for a future meaning (Repeated - is reserved (OPEN)), so the alias cannot stay.

  • Until that revision a tool MAY accept --long as an alias of -long. Documentation, help and examples MUST NOT show it.

  • A conforming CLI framework or library (for example prohelp, or wrappers around arsd.cli) MUST warn at compile or build time when a tool declares a -- spelling, naming the single-dash replacement.

  • A conforming framework or library, and any tool that accepts the alias, MUST warn at run time when a user types a -- form: on stderr, in the CD-13 format, naming the single-dash replacement. For example:

    warning: '--help' is deprecated and scheduled for deletion in the next major revision of the standard
      use: <tool> -help
  • The bare end-of-options marker -- (a token that is exactly --) is a separate, undecided question; see Repeated - is reserved (OPEN) for how it relates to the reservation.

Repeated - is reserved (OPEN)

Status: OPEN for legacy shells; retired in Plus Shell native syntax (DECIDED 2026-12-05, The -- prefix is retired in Plus Shell native syntax (decided)). What --x and ---x will mean on the legacy path is not decided; until then they are reserved, and new tools MUST NOT give them a meaning of their own. The candidates below were written before the retirement and both need repeated dashes, so they do not apply to native syntax.

` and its repetitions belong to free, non-contextual flags (NS-7). `-` belongs to contextual options, whose meaning depends on the verb and whose position matters (`install -npm <pkgname>`). So whatever repeated `-` comes to mean applies to contextual options only, and does not overlap with ` levels. Two candidates are open, plus leaving it reserved.

Candidate A: intensity

More dashes ask for more of the same contextual option. The user infers what "more" means for a given option (Ryan); the tool’s help says it. Scope, config reach and the danger-confirmation gate are not separate meanings. They are what intensity happens to mean for particular options:

  • Danger gate (Ryan: "good idea"). For a destructive option, more intensity means a stronger action, and the strongest forms ask for confirmation:

    $ install -clean ripgrep     # remove ripgrep's cached downloads
    $ install --clean ripgrep    # also remove its installed files; asks for confirmation first
    $ install ---clean ripgrep   # also remove its config and data; asks, and requires the package name to be typed again
  • Scope. For an option like -verbose, more intensity means it travels further down the command line:

    $ vcs -verbose status        # verbose applies to vcs itself (its dispatch and setup), not to status
    $ vcs --verbose status       # also passed on to the status subcommand and anything it runs
    $ vcs ---verbose status      # set for the rest of the session (every later command)
  • Config reach. For a preference, more intensity means it is saved further out:

    $ install -prefer-npm prettier     # this run only
    $ install --prefer-npm prettier    # also saved in the project config (./.oso/install.json5)
    $ install ---prefer-npm prettier   # also saved in the user config (~/.config/oso/install.json5)

    (Paths are illustrative.)

Candidate B: hierarchy depth (Ryan’s favoured direction, not decided)

The number of dashes is the option’s depth under the nearest preceding option with one dash fewer:

$ encode -codec x264 --crf 23 --preset slow -output out.mkv

--crf and --preset are children of the preceding -codec. Going back to a single dash (-output) is the visible break out of that context: -output is a sibling of -codec, not a codec setting.

Why. Ordering alone cannot show whether an option is a sibling or a child. A parser could work it out from a hidden schema (“-crf` only belongs to codecs, so attach it to -codec”), but then the user has to know that schema to read the line, which breaks their mental model of what they typed. Dash depth puts the tree on the command line. It matches prohelp’s hierarchical help: `help -codec lists the children of -codec, and the same children are what may follow it with --.

Intensity moves to a suffix. Under this candidate, repeated dashes are taken by depth, so intensity was written as a suffix on the option word (the ! shorthand, Intensity suffix ! (optional Plus Shell shorthand; no ~ fallback)). It is now a level value (Intensity is a level value (decided)); the lines below show the shorthand:

$ vcs push -force!       # stronger push; may ask for confirmation
$ install -clean!! ripgrep

Open sub-questions:

  • What --- means. Presumably a grandchild (a child of the nearest preceding -- option). Not decided.

  • A child with no parent. encode --crf 23 with no -codec before it. Likely a usage error (CD-8: stderr, exit 2, “--crf` needs a parent option such as `-codec”). Not decided.

  • Interaction with the --long legacy alias (--long is a deprecated legacy alias (decided)). During the transition, --word straight after a parent option could be a child or the deprecated spelling of -word. Proposed resolution, OPEN: a tool may use child options only if it declares no -- legacy spellings at all; a tool that still has legacy spellings reads --word as the legacy alias only where no parent context is open (as the first option, or right after a parent’s operands end in a way the tool’s schema makes unambiguous) and otherwise as a child. The simpler rule (no children while any legacy spelling exists) is recommended, because it needs no schema to read.

Leave it reserved

Repeated - keeps no meaning.

Intensity suffix ! (optional Plus Shell shorthand; no ~ fallback)

Status (amended 2026-12-05): intensity itself is now a level value (Intensity is a level value (decided)), which works in every shell. The suffix ! is kept only as an optional Plus Shell native shorthand (-clean!!); how it maps onto levels is OPEN (schema-first seed, D16), and legacy shells and tool libraries do not need it. The rest of this section is about the shorthand and why it is unavailable in some shells. Earlier decision (Ryan): ! is the canonical intensity suffix (-force!, -clean!!). Ryan: shells that break ! "need to get on my level, not I on theirs". The hierarchy candidate as a whole stays OPEN; the suffix character does not.

  • Non-conforming shells. Interactive bash and interactive zsh expand ! (history expansion) by default, so -clean!! arrives as -clean followed by the previous command line. These shells are NON-CONFORMING for FreeCLI unless history expansion is turned off. The fix, in the rc file:

    # ~/.bashrc
    set +H                 # same as: set +o histexpand
    # ~/.zshrc
    unsetopt BANG_HIST

    A tool cannot change its parent shell, so this is user setup. A FreeCLI installer or setup script MAY add these lines.

  • No ~ fallback (DECIDED 2026-12-05, Ryan; reverses 2026-10-26). There is no official stand-in for !. The earlier rule that conforming tools MUST accept ~ with the same meaning as ! (-force~, -clean~~), and that docs and help teach ~ on interactive bash and zsh, is reversed. Conforming tools MUST NOT treat a trailing ~ as intensity. A token such as -clean~ or -clean~~ is an unknown option (CD-8), and the error SHOULD point at the tool’s compatibility/incompatibilities help page (CH-28). On shells that mangle ! (interactive bash and zsh with history expansion on, which is the default; cmd.exe with delayed expansion on), the ! form is simply not available. Each tool’s help MUST explain this on that compatibility page, rather than offering a second official spelling.

  • Which spelling docs and help teach (amended 2026-12-05). Documentation, instructions and tool help teach the level value (-clean 2) as the portable spelling, and teach ! only as the optional Plus Shell shorthand, which is unavailable in interactive bash and zsh unless history expansion is off, and in cmd when delayed expansion is on. They do not teach ~. Turning history expansion off (set +H, unsetopt BANG_HIST, above) is how a bash or zsh user becomes conforming and can type !.

  • No guard against mangled ! (Decided, Ryan). "If someone attempts to use the wrong syntax in zsh, they should just see bad output." Tools do not try to detect arguments that history expansion has mangled (-cleanpython3 …​), and help carries no extra warning about it beyond the compatibility page (CH-28): the user gets whatever the mangled arguments produce, usually an unknown-option usage error (CD-8). Quoted '-clean!!' may reach the tool; that is a shell fact, not a taught official fallback.

  • Shell companion. An OPTIONAL companion for interactive bash and zsh may warn, before the line is accepted, that ! will be mangled and may point at CH-28. It MUST NOT rewrite ! to ~ (the earlier rewrite is withdrawn). See Optional shell companion (PROVISIONAL).

Table 2. Shell compatibility for the ! suffix
Shell Status Type this Notes

bash, non-interactive (scripts, bash -c)

conforming as-is

install -clean!! ripgrep

history expansion is off

bash, interactive

not conforming until setup

the ! form is not available

after set +H in ~/.bashrc: install -clean!! ripgrep. There is no ~ fallback

zsh, non-interactive

conforming as-is

install -clean!! ripgrep

zsh, interactive

not conforming until setup

the ! form is not available

after unsetopt BANG_HIST in ~/.zshrc: install -clean!! ripgrep. There is no ~ fallback

fish

conforming as-is

install -clean!! ripgrep

no history expansion

PowerShell 7

conforming as-is

install -clean!! ripgrep

Windows PowerShell 5.1

conforming as-is

install -clean!! ripgrep

cmd.exe

conforming as-is

install -clean!! ripgrep

with delayed expansion off (the default). With delayed expansion on (cmd /v:on or the registry setting), ! is stripped (-force! arrives as -force) and the ! form is not available

Table 3. Unquoted suffix safety (tested 2026-10-26; bash 5.2, zsh, fish, PowerShell 7.4.6 on Linux; Windows PowerShell 5.1 and cmd.exe on Windows 11)
Arg bash -c bash -i zsh -c zsh -i fish pwsh 7 PS 5.1 cmd

-force!

ok

ok1

ok

ok1

ok

ok

ok

ok2

-clean!!

ok

expanded

ok

expanded

ok

ok

ok

ok2

-x~

ok

ok

ok

ok

ok

ok

ok

ok

-x+ / -x++

ok

ok

ok

ok

ok

ok

ok

ok

-x^ / -x^^

ok

ok

ok3

ok3

ok

ok

ok

stripped

-x*

glob4

glob4

error

error

error

ok

ok

ok

-x%

ok

ok

ok

ok

ok

ok

ok

ok5

-x=

ok

ok

ok

ok

ok

ok

ok

ok6

-x@

ok

ok

ok

ok

ok

ok

ok

ok

-x.

ok

ok

ok

ok

ok

split

split

ok

-x:

ok

ok

ok

ok

ok

error

error

ok

-x#

ok

ok

ok7

ok7

ok

ok

ok

ok

ok = the program received the exact literal argument. expanded: -clean!! became -cleanpython3 a.py -force! (the previous line). stripped: cmd removed ^ (its escape character), the program got -x. error: zsh and fish "no matches found" for -x*; PowerShell "Parameter -x: requires an argument". split: PowerShell passed -x and . as two arguments. The -x~ row is kept as a measurement: ~ reached the program unchanged in every shell tested, including zsh with extendedglob (a trailing ~ is not a pattern) and bash/zsh tilde expansion (which only applies at the start of a word). That does not make ~ an official suffix. As of 2026-12-05 it is not a fallback and tools MUST NOT treat it as intensity.

  1. A lone trailing ! survives, but ! followed by text (-force!x) gives "event not found".

  2. With delayed expansion on, ! is stripped.

  3. With setopt extendedglob, ^ is a glob operator: "no matches found".

  4. Passed literally only when no file matches -x*; with a file -xA present, bash passed -xA.

  5. Literal at the prompt and through %*, but % is special inside batch files.

  6. Reached the program through %*; cmd treats = as an argument separator for %1-style access.

  7. With setopt extendedglob, x# is a glob ("zero or more x"): "no matches found".

PowerShell’s @ (splatting) and # (comment) are special only at the start of a word, and --% (stop parsing) only as a whole word, so none of them affected a trailing suffix. Test harness: an argv-echo program (python -c "import sys;print(sys.argv[1:])"), invoked through each shell, with interactive bash and zsh fed the commands on stdin so history expansion was on.

Bare --: whether the token -- (exactly two dashes, nothing after) stays the end-of-options marker is a separate question. It does not conflict with reserving --x and ---x, because it has no name after the dashes. It could conflict with a candidate that gives a bare repeated dash a meaning of its own (for example a bare --- for "session scope from here on"); if one of those is chosen, the end-of-options marker has to be decided at the same time.

Optional shell companion (PROVISIONAL)

Ryan: "rewriting is useful, so is the other use-cases. build as much facility as you can into these companions for both". The !-to-~ rewrite those words originally covered is withdrawn as of 2026-12-05; rewriting is no longer a facility this companion should offer for intensity.

This section is OPTIONAL and separate from the library MUSTs above. Tools MUST NOT depend on a companion, and nothing in NS-15 or CLI Dispatch changes when one is installed. The baseline for shells is library-generated completions, <tool> completions zsh|bash|fish|pwsh (CH-26, SHOULD). A shell companion is an optional enhancement for interactive bash and zsh, the two shells that are not FreeCLI certified for !. As of 2026-12-05 it MUST NOT rewrite ! to ~ (the ~ fallback is reversed; see Intensity suffix ! (optional Plus Shell shorthand; no ~ fallback)). It may warn that ! will be mangled and point at CH-28. It reads the tool’s JSON help (CH-23 plus the PROVISIONAL CH-25 additions) and caches it per tool and version.

Facility zsh bash

Warn, when the user presses Enter, that a trailing ! on an NS-15 option word will be mangled by history expansion in this shell, and point at the compatibility page (CH-28). The companion MUST NOT rewrite ! to ~. Quoted text, comments and real history references (!!, !$) are never touched.

accept-line widget

bind -x with an Enter macro

Completion: commands, options at each depth (under the hierarchy candidate, a --child is offered only after its -parent), level values (0 to 9, low, med, high, from the schema) for level switches, and the ! shorthand only where the shell passes ! through (never as ~), enum and path operands

compdef, with descriptions

complete -F

Highlighting of illegal NS-15 tokens: letter-hyphen names (-f-stop), mixed groups (-x-dry-run), orphan children, undeclared names (-xvz only if the tool does not declare it), a value outside the declared level enum. Bare words are never highlighted as options; they are nodes only where the namespace declares one at that position, otherwise values (Token kinds and bare-word nodes (decided))

Live, as you type (region_highlight)

A warning when you press Enter, or on a key; bash cannot colour part of the line as you type

Inline hints for what each intensity level of the option under the cursor means

Live, under the line (POSTDISPLAY)

On a key (Alt-h)

  • The companion MUST NOT rewrite ! to ~. The prototype in tools/shell-companions/ still contains that rewrite; removing it is pending. A warning that ! will be mangled, pointing at CH-28, is the most the companion should do. There is no fallback notice on the tool, because tools no longer accept ~ as intensity.

  • zsh treats !" specially: it removes the ! from "-force!" and leaves an unbalanced quote, so the shell waits at a dquote> prompt. This is zsh history expansion, not the companion; a companion leaves quoted text alone.

  • Home: a prototype exists, with pty tests in real bash 5.2 and zsh 5.9. Where it is published is pending Ryan’s choice.

What already exists, and what is new

  • Plan 9 has no PATH; /bin is a union of bound folders in a per-process namespace. This page keeps the per-session layering but makes the tree one of tasks with metadata, not of files.

  • PowerShell finds cmdlets by verb-noun through modules and Get-Command, and exposes stores as drives through providers. Module lookup still walks a path list (PSModulePath), and native executables still use PATH.

  • Windows App Paths is a registry of command names to executables used by ShellExecute, not by consoles. It is flat and has no metadata.

  • Nushell gives built-in commands declared signatures; external commands are still found on PATH.

  • git, cargo and kubectl plugins fake a hierarchy with file names (git-foo becomes git foo).

  • Nix, Homebrew, Debian alternatives, asdf and mise control which binary a name points to, by profiles, links or shims; they still publish into one flat PATH.

New here: externals register into one task-shaped tree with owners, versions and signatures; the current folder becomes a declared input; and temporary changes are named by level, lifetime and scope.