Skip to content

Add wslc cp alias for wslc container cp - #41902

Open
ggarzia-MSFT wants to merge 6 commits into
masterfrom
user/ggarzia/wslc-cp-alias
Open

ggarzia-MSFT wants to merge 6 commits into
masterfrom
user/ggarzia/wslc-cp-alias

Conversation

@ggarzia-MSFT

@ggarzia-MSFT ggarzia-MSFT commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Adds wslc cp as a top-level alias for wslc container cp. matching docker cp

Also allows for adding usage examples to a command's help output

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ggarzia-MSFT
ggarzia-MSFT requested review from a team as code owners October 13, 2026 17:51
Copilot AI balanced review requested due to automatic review settings October 13, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new alias’s help text incorrectly advertises only the nested command spelling.

1 open finding
What changed in this PR

Adds wslc cp as a top-level alias for wslc container cp.

Changes:

  • Registers the existing container copy command at the root.
  • Adds parsing tests for the new alias.
File Description
src/​windows/​wslc/​commands/​RootCommand.cpp Registers the top-level cp command.
test/​windows/​wslc/​CommandLineTestCases.h Tests basic alias parsing and -L.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/windows/wslc/commands/RootCommand.cpp
ggarzia-MSFT and others added 2 commits October 13, 2026 12:03
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Existing locale-specific long descriptions will produce stale and duplicated help output, and the new alias help path lacks execution-level coverage.

2 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread localization/strings/en-US/Resources.resw Outdated
Comment thread test/windows/wslc/CommandLineTestCases.h
ggarzia-MSFT and others added 2 commits October 13, 2026 13:09
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The alias, invocation-aware help output, localization, and parsing behavior are implemented consistently and covered by tests.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 22:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The advertised help-example capability is absent, and existing examples are removed.

1 open finding

🧠 Review effort: Balanced

std::wstring ContainerCpCommand::LongDescription() const
{
return Localization::WSLCCLI_ContainerCpLongDesc();
return Localization::WSLCCLI_ContainerCpDesc();

@ranm-msft ranm-msft left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.

Checked that the help-output change is byte-identical for the non-full-help path, so the only rendering difference is in full help. The localization placeholders are correctly moved into non-localized C++ literals rather than being left inside the localized strings, which is the right split. Tests were added for both cp --help and container cp --help.

This branch has not been deployed

No deployments
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.

4 participants