Skip to content

CLI: Rename delete command to remove, add 'rm' alias#14399

Open
dkbennett wants to merge 1 commit intofeature/wsl-for-appsfrom
user/dkbennett/renamedeletetoremove
Open

CLI: Rename delete command to remove, add 'rm' alias#14399
dkbennett wants to merge 1 commit intofeature/wsl-for-appsfrom
user/dkbennett/renamedeletetoremove

Conversation

@dkbennett
Copy link
Member

Summary of the Pull Request

Renames the "delete" command to "remove"
Adds the "rm" alias for this command

Renames the associated task as well, and updates tests.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Entire PR is just renaming and adding the "rm" alias to the command.

The diff might be a bit off because I am preserving alphabetical ordering in the tasks so that may cause it to look like there's new functions but it's just a rename.

Validation Steps Performed

Ran updated unit and E2E tests and all pass. Verified command is also functioning as "remove" or "rm"

@dkbennett dkbennett requested a review from a team as a code owner March 10, 2026 22:42
Copilot AI review requested due to automatic review settings March 10, 2026 22:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the WSLC CLI container deletion UX by renaming the delete command to remove and adding a Docker-like rm alias, with corresponding task and test updates.

Changes:

  • Rename container delete / delete to container remove / remove.
  • Add rm as an alias for the remove command (including container rm).
  • Update unit/E2E tests and task wiring to reflect the new command name.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/windows/wslc/e2e/WSLCE2EHelpers.cpp Update cleanup helper to invoke container remove instead of container delete.
test/windows/wslc/e2e/WSLCE2EGlobalTests.cpp Update expected root help output to list remove instead of delete.
test/windows/wslc/e2e/WSLCE2EContainerTests.cpp Update expected container subcommand help output to list remove instead of delete.
test/windows/wslc/CommandLineTestCases.h Update parsing test cases to expect remove and accept rm alias forms.
src/windows/wslc/tasks/ContainerTasks.h Rename task declaration from DeleteContainers to RemoveContainers.
src/windows/wslc/tasks/ContainerTasks.cpp Rename/relocate implementation to RemoveContainers while keeping deletion behavior.
src/windows/wslc/commands/RootCommand.cpp Replace registration of ContainerDeleteCommand with ContainerRemoveCommand.
src/windows/wslc/commands/ContainerRemoveCommand.cpp Implement remove command execution and descriptions.
src/windows/wslc/commands/ContainerCommand.h Replace ContainerDeleteCommand with ContainerRemoveCommand and add rm alias.
src/windows/wslc/commands/ContainerCommand.cpp Replace ContainerDeleteCommand registration with ContainerRemoveCommand.
Comments suppressed due to low confidence (1)

src/windows/wslc/commands/ContainerRemoveCommand.cpp:32

  • ArgType::Force is included for remove, but its default description (from ArgumentDefinitions.h) still says "Delete containers even if they are running". This will make wslc (container) remove --help show outdated wording. Consider overriding the description in this command (via Argument::Create(..., desc=...)) or updating the shared ArgType::Force description to use “Remove” wording.

You can also share your feedback on Copilot code review. Take the survey.

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