microsoft / microsoft/winget-cli
Winget List - support for version filtering
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
#1155
Hi.
I often need to check if a specific package version is installed, or what version of a specific package is installed.
Currently I have to parse text output, which is not fun, given the variable column names/widths etc.
Proposal: Add a --version argument to the list command similar to search / install / uninstall. Only show matches to that version.
Optionally --version-min and -- version-max and differentiation between "not installed" and "wrong version"
Thanks!
Proposed technical implementation details
winget list <query> [--version <string>]
Only return packages if matching the version
Optional:
winget list <query> [--version-min <string1>] [--version-max <string2>]
Only show if installed version >= min version and/or <= max-version (should support one argument or both together)
Alphanumeric Dot-Version string comparison
Not compatible with --version. Alternatively, make --version support '>', '<', '>=', '<=' and some character for "in between" that is not usually used in versions ('*','~', '<>' etc.) Ex: --version '<=1.2.3a' or --version '1.2.6<>1.3.9a'
Optional: different messages / exit codes for "no package" vs "different version is present"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the list command's argument handling and compare the existing --version behavior in search, install, and uninstall. Determine the intended scope for exact matching versus optional ranges and distinct exit codes. Done means list can filter installed packages by the requested version and has tests covering the selected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100