microsoft / microsoft/winget-cli

Change default sort order on search.

Open
#142 21 comments 31 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Output Area-Settings Area-Sorting Command-Search Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Summary

Customize the sort order of package result tables, with support for both CLI arguments and a default preference in settings.

Status: Sorting has shipped for the installed-packages table (winget list / winget upgrade) — --sort <field>, --sort-ascending / --sort-descending, and the output.sortOrder setting (fields: name, id, version, source, available, relevance). This issue now tracks the remaining work for winget search, which is not yet wired for sorting.

Remaining scope — winget search

  • Support --sort <field> on winget search (parity with list / upgrade).
  • Honor the output.sortOrder setting for search output.
  • Allow ordering results alphabetically by package name or id.

Multi-source display

  • Let the user configure whether results from multiple sources are grouped by source (today's default — grouped by the order sources are configured in winget source list) or coalesced into a single ranked list.
  • For coalesced output, use the default Windows Package Manager sort criteria. Manifest/REST source quality will impact ranking.
  • When coalesced results contain duplicates, break ties between equally-ranked results by source priority (see #1488).

Notes

  • The current search order is based on the fields matched, and may vary by source — REST sources are allowed to return results in any order they prefer.

Consolidates #1769.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the winget search command and compare its behavior with the already-supported sorting in winget list and winget upgrade. Trace how output.sortOrder, --sort, and source grouping are handled, then verify that search supports name and id ordering, configured defaults, coalesced or grouped multi-source results, and source-priority tie breaks.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.