Repository navigation
Support command options in dynamic exec calls - #237
Merged
Mike Krüger (mkrueger) merged 3 commits intoOct 8, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mike Krüger (mkrueger)
requested review from
a team
and
a balanced review from Copilot
October 5, 2026 07:16
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall line coverage in commit 3af5e79 in the Show a line coverage summary of the most impacted files.
Updated |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Command expressions can silently alter malformed options with missing inline values.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Extends dynamic exec calls to use the shell’s existing command-argument syntax.
Changes:
- Shares option and shell-word parsing between direct commands and
exec. - Evaluates option-shaped arguments as positional text for functions and scripts.
- Preserves argument formatting and adds regression tests and documentation.
| File | Description |
|---|---|
| README.md | Summarizes dynamic argument support. |
| docs/programming.md | Documents exec parsing and evaluation. |
| docs/commands.md | Adds option syntax and an example. |
| CosmosDBShell/Azure.Data.Cosmos.Shell.Parser/StatementParser.cs | Shares command-argument parsing. |
| CosmosDBShell/Azure.Data.Cosmos.Shell.Parser/Statement/ExecStatement.cs | Preserves options and quoted arguments when formatting. |
| CosmosDBShell/Azure.Data.Cosmos.Shell.Parser/Statement/CommandOption.cs | Evaluates options as positional text. |
| CosmosDBShell/Azure.Data.Cosmos.Shell.Parser/CommandArgumentFormatter.cs | Extracts option-name formatting. |
| CosmosDBShell.Tests/Parser/StatementParserEdgeTests.cs | Tests boundaries, missing values, and formatting. |
| CosmosDBShell.Tests/Parser/CommandExecutionTests.cs | Tests binding, positional arguments, and scope restoration. |
| CHANGELOG.md | Records the argument-parsing fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve PR #237 conflicts by sharing command argument parsing and preserving both regression suites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mike Krüger (mkrueger)
enabled auto-merge (squash)
October 8, 2026 12:31
Laurent Nguyen (languy)
approved these changes
Oct 8, 2026
Mike Krüger (mkrueger)
deleted the
dev/mkrueger/fix/exec-option-forwarding
branch
October 8, 2026 12:34
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.

Summary
Validation