dotnet / dotnet/sdk

dotnet package search: allow --take with --exact-match

Open
#53,467 0 comments 2 reactions 1 assignee Claimed by @baronfel View on GitHub
untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.
When using `dotnet package search` with `--exact-match`, the command returns all versions of the package and ignores `--take`.

For packages with many versions, this makes the output noisy and harder to use in scripts or quick terminal workflows.

Example:

```bash
dotnet package search "Uno.SDK" --exact-match --prerelease --take 1
```

Today, `--take 1` is ignored because `--exact-match` causes both `--take` and `--skip` to be ignored.

### Describe the solution you'd like
Please allow `--take` to work together with `--exact-match`.

That would let users search for one exact package ID while still limiting how many matching versions are returned.

For example:

```bash
dotnet package search "Uno.SDK" --exact-match --prerelease --take 1
```

could return only the top 1 matching version instead of the full version list.

### Additional context
`--exact-match` is very useful to avoid partial matches, but for packages with many stable and prerelease versions the current behavior produces too much output.

If preserving current behavior is important, another option would be introducing a new flag specifically for limiting versions when `--exact-match` is used.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.