Repository navigation
ReadArgs: KEY=value from the host command line, and any number of names - #204
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=0now means whatprog ITER=0means 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-hand--helpofHELP=--help=-h/Snow match, as they do on AmigaOS and under vamos.FindArggets this through the same parser.New tests:
quote_arg_if_needed_leaves_key_equals_value_for_readargsandfind_arg_matches_every_name_of_a_slot_with_more_than_two.cargo test -p volamos-coreotherwise has the same two failures as main (pending_host_break_folds_into_check_signalandpending_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=0andITER=1 MINTIME=500 dhrystonenow behave as under vamos.🤖 Generated with Claude Code