Skip to content

Enumerate packages when multiple found by 'winget install xxxx' #3370

@nWestie

Description

@nWestie

Description of the new feature / enhancement

Currently, when winget finds multiple matching packages for the name provided, it lists them and exits. Instead, it would be useful if, when the number of options is small(perhaps <10 or a screen full), it enumerates the options and allowes the user to enter a number, then installs that.
Currently, I must type out the full identifier or grab my mouse to copy and paste. Yes, this is not that much of a nuisance, but I think my suggestion is also similarly simple.

Current Layout

PS C:\Users\westn> winget install git
Multiple packages found matching input criteria. Please refine the input.
Name   Id           Source
---------------------------
My Git 9NLVK2SL2SSP msstore
Git    Git.Git      winget

Suggested Layout

PS C:\Users\westn> winget install git
Multiple packages found matching input criteria. Please refine the input.
Name   Id           Source
---------------------------
1) My Git 9NLVK2SL2SSP msstore
2) Git    Git.Git      winget
Select a package to continue: 

Proposed technical implementation details

This seems fairly straight forward technically. If >1 but <10 packages are found when winget install xx is called, it numbers the options down the left side, and prompts the user to pick one. The user enters a number, and install continues.
This should only happen when installing a single package, not when installing from a import file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.Resolution-DuplicateIssue is a duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions