Skip to content

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Jun 16, 2025

Description Of Changes

Using a newly created spreadsheet which lists all the
command/subcommands/options for Chocolatey CLI, update the
ChocolateyTabExpansion.ps1 file to use this "source of truth". This
includes adding missing commands/subcommands/options where required. In
addition, the new default option for each command is applied, and these
will be used elsewhere going forward, i.e. in our documentation, so that
we can start to get some consistency.

Motivation and Context

We need to ensure consistency across Chocolatey CLI's "API", and this is a first
pass at getting to a known set of command/subcommands/options for tab
completion, and once this is rolled out, these default options will flow into
our documentation.

Testing

We will complete a Test-Kitchen execution on this PR branch to ensure everything works as expected.

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 #3700

gep13 added 2 commits June 16, 2025 11:37
This commit attempts to apply some clear organisation to the
ChocolateyTabExpansion.ps1 file by using alphabetical orderding, both in
terms of the commands that are listed out, as well as the options that
are passed into commands.  This will hopefully make this file easier to
update, and to see what options are applied where.
Using a newly created spreadsheet which lists all the
command/subcommands/options for Chocolatey CLI, update the
ChocolateyTabExpansion.ps1 file to use this "source of truth". This
includes adding missing commands/subcommands/options where required. In
addition, the new default option for each command is applied, and these
will be used elsewhere going forward, i.e. in our documentation, so that
we can start to get some consistency.

In addition, changes were made to the settings.json file for VSCode, so
that known words would not cause "Problems" to be reported when editting
the file.
@gep13 gep13 requested a review from AdmiringWorm June 16, 2025 10:47
@gep13 gep13 changed the title Tab expansion (#3700) Overhaul ChocolateyTabExpansion.ps1 Jun 16, 2025
Now that all the commands/subcommands/options have been updated in the
main ChocolateyTabExpansion.ps1 file, the corresponding tests have had
to be updated/added to use them.
Copy link
Member

@AdmiringWorm AdmiringWorm left a comment

Choose a reason for hiding this comment

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

LGTM

@AdmiringWorm AdmiringWorm merged commit 16c5b51 into chocolatey:develop Jun 17, 2025
5 checks passed
@AdmiringWorm
Copy link
Member

Awesome work on getting this updated @gep13.

@gep13 gep13 deleted the tab-expansion branch June 17, 2025 09:00
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.

Improve readability, maintainabilty, and correctness of the ChocolateyTabExpansion.ps1 file
2 participants