Skip to content

20261013 - cMeta v0.36.0: the command line - free text with = stays text, negative numbers, control flags take a word, -- refused in words - #59

Merged
gfursin merged 4 commits into
mainfrom
dev
Oct 13, 2026
Merged

gfursin merged 4 commits into
mainfrom
dev

Conversation

@gfursin

@gfursin gfursin commented Oct 13, 2026

Copy link
Copy Markdown
Member

cMeta v0.36.0 - see CHANGELOG.md (## 0.36.0). A new minor version for a change of the command line itself:

  • The command line: a bare key=value is a flag only when the part before = looks like a key, so free text with = ("echo a=b", a URL with a query string, a one-liner with ==) stays one positional argument; a negative number (-5) is a value, not a flag; the engine's own control flags take a word (--quiet=yes, --json=no); text after -- reaches the commands that read it and is refused in words by the others. Every key form that worked keeps its result: pinned by a table test, a 20,000-case comparison of the old and the new parser, and a scan of every real cx command line in the maintainer's repositories.
  • The docs: --key value never was a form (it is the flag --key and a positional value); the rules for a bare key=value, negative numbers and --.
  • Native messaging hosts for cMeta add-ons (cx utils native-host-install|check|run).

Every commit is signed off. Please merge with a merge commit (not a squash), so that dev only needs a fast-forward afterwards.

🤖 Generated with Claude Code

gfursin and others added 4 commits October 13, 2026 11:00
…_path, utils.sys.RUN_STOP_GRACE_SECONDS)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Grigori Fursin <gfursin@gmail.com>
Signed-off-by: Grigori Fursin <gfursin@gmail.com>
… a value, a control flag takes a word, "--" refused in words

Four small corrections of the parser (cmeta/utils/cli.py) and of the call of a command (cmeta/core.py), none of
which changes a command that worked:

- a bare key=value is a flag only when the part before the first "=" looks like a key (a letter or "_", then
  letters, digits, "_", ".", ",", "-"): `cx host run h "echo a=b"`, a URL with a query string or a Python
  one-liner with "==" was cut into a parameter named by its first words and is one positional argument now;
  every key that worked (name=v, a.b=v, tags,=a,b, name=John Smith, path=C:\x\y) works as before;
- a negative number (-5, -1.5) is a positional argument, not a flag named "5"; --delta=-5 was and is a value;
- the engine's own control flags (--quiet, --verbose, --json, --debug, ...) given a word (--quiet=yes, --json=no)
  took the value converted for the flag before them or failed with "cannot access local variable
  'converted_value'" - a typo in check_params; they read yes/no, true/false, on/off, 1/0 and refuse another word
  by name;
- the text after "--" reaches a command as `unparsed`; a keyword-style command without such a parameter (and
  without **kwargs) says '"<category> <command>" takes no arguments after "--"' instead of Python's TypeError.

The docs (using-cmeta.md, common-commands.md, the README, the use-cmeta-cli skill) said "--key value" was a form:
it never was ("--key value" is the flag --key and a positional value) and they say so now, with the rule for a
bare key=value, negative numbers and "--".

Tests: tests/core_tests/test_cli_parse_table.py - the table of every token kind (36 rows), every bool control flag
with every word and a wrong one, a flag given a word after another flag, the three command styles with text after
"--" (a parameter, **kwargs, a dict), and the command line end to end in another process. On the code before this
change 27 of its 56 tests fail.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Grigori Fursin <gfursin@gmail.com>
The version in every file that carries it (docs/releasing.md, step 2); release date 2026-10-13. The development
version 0.35.2.1 is released as 0.36.0 - a new minor version for a change of the command line itself: free text with
"=" stays text, a negative number is a value, the engine's own control flags take a word, text after "--" is refused
in words by a command that does not read it; and the native messaging hosts for cMeta add-ons.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Grigori Fursin <gfursin@gmail.com>
@gfursin
gfursin merged commit 43a7026 into main Oct 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant