Skip to content

ReadArgs: KEY=value from the host command line, and any number of names - #204

Merged
sidick merged 1 commit into
sidick:mainfrom
codewiz:readargs-fixes
Oct 24, 2026
Merged

sidick merged 1 commit into
sidick:mainfrom
codewiz:readargs-fixes

Conversation

@codewiz

@codewiz codewiz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Fixes the first two parts of #203. The third, answering ?, is still open.

  • quote_arg_if_needed() no longer quotes a host argument just because it contains =. volamos -- prog ITER=0 now means what prog ITER=0 means in a shell: the keyword ITER with the value 0. An argument that also has whitespace, ;, " or * is still quoted, as before.
  • parse_template() keeps every =-separated name of a keyword instead of the first two. The -h and --help of HELP=--help=-h/S now match, as they do on AmigaOS and under vamos. FindArg gets this through the same parser.

New tests: quote_arg_if_needed_leaves_key_equals_value_for_readargs and find_arg_matches_every_name_of_a_slot_with_more_than_two. cargo test -p volamos-core otherwise has the same two failures as main (pending_host_break_folds_into_check_signal and pending_host_break_folds_into_wait).

Checked with BenchWork's new template, BENCH/M,ITER/K/N,MINTIME/K/N,FASTMEM/S,LIST/S,HELP=--help=-h/S: -h, --help, ITER=0 and ITER=1 MINTIME=500 dhrystone now behave as under vamos.

🤖 Generated with Claude Code

A host argument containing '=' was quoted, so ITER=0 never matched the
ITER keyword; and a template keyword kept at most two names, so the -h
of HELP=--help=-h/S matched nothing.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@sidick
sidick merged commit ca8c732 into sidick:main Oct 24, 2026
9 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.

2 participants