chocolatey / chocolatey/choco

Add support to `Install-ChocolateyFileAssociation` for multiple file extensions

Open
#161 4 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Documentation Enhancement Priority - Low
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

Moving discussion from the old [chocolatey issue 683](https://github.com/chocolatey/chocolatey/issues/683) for function [Install-ChocolateyFileAssociation](https://github.com/chocolatey/chocolatey/blob/aa854645de9d0234d3017aad001e8f9bd8b46f2f/src/helpers/functions/Install-ChocolateyFileAssociation.ps1)

**Summary**
- allow callers to send multiple file extensions instead of calling this method _n_ times for _n_ file extension associations.
- change param `string $extension` to `string[] $extensions`
- existing code will out in the wild will work because of parameter name disambiguation. `extension` is sufficient enough to be disambiguated to `extensions`, just as `ext` would too.
- change function to iterate through `$extensions` one by one and use existing code with no changes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.