Skip to content

Conversation

@AdmiringWorm
Copy link
Member

Description Of Changes

  • Added comprehensive tab completion entries for choco download options: allow-empty-checksums, allow-empty-checksums-secure, ignore-checksum, ignore-dependencies-from-source, require-checksums, and other existing download switches.
  • Updated TabExpansion to expose all download-related options so shell completion shows these flags.
  • Added a Pester test (Should list completions for downolad (Licensed)) to verify the new completions when licensed features are available.

Motivation and Context

  • Fix missing completions for choco download to improve shell UX for licensed/pro users and ensure completion parity with available command flags.

Testing

  • Added Pester test that asserts the completion list includes the newly added download switches.
  1. Source the changed tab completion files using . .\src\chocolatey.resources\helpers\ChocolateyTabExpansion.ps1.
  2. Type choco download the continue hitting the tab character to verify the following options are showing up:
  • --allow-empty-checksums
  • --allow-empty-checksums-secure
  • --ignore-checksum
  • --ignore-dependencies-from-source=''
  • --require-checksums

Operating Systems Testing

  • Windows 11

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

Fixes #3817

@AdmiringWorm AdmiringWorm requested review from corbob and gep13 November 21, 2025 09:22
gep13
gep13 previously approved these changes Nov 21, 2025
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

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

LGTM!

Add comprehensive completion entries for the `choco download` command
to TabExpansion and update tests to assert those completions when the
licensed/pro features are available.

- Extend commandOptions.download with many download-related flags:
  allow-empty-checksums, allow-empty-checksums-secure,
  ignore-checksum, ignore-dependencies-from-source, require-checksums, 
  and other existing download switches. This ensures the tab completion
  engine exposes all pro and non-pro download options.
- Add a Pester test case (Should list completions for downolad (Licensed))
  that verifies the completion list includes the newly added download
  switches. The test is skipped when the license flag ($isLicensed) is
  not set, preserving existing test behavior.

This change fixes missing completions for `choco download`, improving the
shell UX for licensed users and keeping tests aligned with available
pro flags.
@AdmiringWorm AdmiringWorm merged commit 2c52659 into chocolatey:develop Nov 21, 2025
5 checks passed
@AdmiringWorm AdmiringWorm deleted the 3817-tab-completions branch November 21, 2025 14:47
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.

Update tab completion script with new options added in Chocolatey Licensed Extension

3 participants