Skip to content

fix: assemble Quick Action argv for clap operands and dash values - #257

Merged
SebTardif merged 2 commits into
mainfrom
fix/improve-mpi-20260828-s1414
Aug 28, 2026
Merged

fix: assemble Quick Action argv for clap operands and dash values#257
SebTardif merged 2 commits into
mainfrom
fix/improve-mpi-20260828-s1414

Conversation

@SebTardif

@SebTardif SebTardif commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Remaining Quick Action builders still put path operands before options. Clap then treats a later --apply as a second apply flag when the path is --apply.

This PR puts those paths after --. serializePatchloomArgs still inserts --apply before --, so apply stays a flag.

User option values that start with - (Create content --, replace --new -n) also fail with space form. Builders now emit --flag=value.

Change

  • withEndOfOptions on create, append, prepend, tidy, apply-fragment, markdown actions, patch apply/merge, and doc merge
  • withOption for user-supplied option values (--content=--, --new=-n, headings, predicates)
  • Undo stays ["undo"] (no mixed path and options)

Validation

  • Live CLI 0.28.0: create --content=-- --apply -- file writes --
  • npm run check: 431 passed, 7 skipped, coverage and package green

Notes

Create, append, prepend, tidy, apply-fragment, md, patch, and doc
merge still put the file path before options. A path of --apply
made clap treat it as the apply flag. Same -- terminator as #256.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
github-actions[bot]
github-actions Bot previously approved these changes Aug 28, 2026
Clap treats a following `--` or `-n` as end-of-options or another
flag, so create/replace content starting with a dash failed. Bind
user option values with equals form.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif SebTardif changed the title fix: put remaining Quick Action paths after -- fix: assemble Quick Action argv for clap operands and dash values Aug 28, 2026
@SebTardif
SebTardif marked this pull request as ready for review August 28, 2026 21:35
@SebTardif
SebTardif merged commit c2151ae into main Aug 28, 2026
21 of 22 checks passed
@SebTardif
SebTardif deleted the fix/improve-mpi-20260828-s1414 branch August 28, 2026 21:35
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