Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unexpected behaviour using --id-starts-with to search with a 1 or 2 character term #347

@bobf32

Description

@bobf32

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

I am seeing inconsistent, unexpected results when running choco search with the id-start-with option.

What is Expected?

I would expect the three searches described to return a descending number of results, with each subsequent search returning a subset of the one above.

How Did You Get This To Happen?

If I do this search, I expect all packages where the id (which I assume means name) start with v.

choco search v --id-starts-with

I get 19 packages returned, none of which are vim. Then I do:

choco search vi --id-starts-with

This returns 9 packages, including vim and vim console. Now if I do:

choco search vim --id-starts-with

I get 11 packages returned, all starting vim.

System Details

  • Operating System: Win 11 Pro
  • Windows PowerShell version: 7.4.7
  • Chocolatey CLI Version: 2.4.3
  • Chocolatey Licensed Extension version:
  • Chocolatey License type: Free
  • Terminal/Emulator: Windows Terminal

Installed Packages

Chocolatey v2.4.3
chocolatey 2.4.3
chocolatey-core.extension 1.3.5.1
chocolatey-dotnetfx.extension 1.0.1
chocolatey-visualstudio.extension 1.8.1
chocolatey-windowsupdate.extension 1.0.4
colortool 19.4.29002
dotnetfx 4.8.0.20190930
emacs 30.1.0
emacs.portable 30.1.0
fd 10.2.0
gpg4win 4.4.0.20250221
gsudo 2.4.4
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
kdevelop 5.6.2.1900
lxrunoffline 3.5.0
nodejs-lts 20.17.0
php 8.3.11
python 3.8.2
python3 3.8.2
ripgrep 14.1.0
vcredist140 14.40.33810
vcredist2015 14.0.24215.20170201
vcxsrv 1.20.8.1
visualstudio2017buildtools 15.9.21
visualstudio2017-workload-vctools 1.3.2
visualstudio-installer 2.0.1
Wget 1.21.4

Output Log

https://gist.github.com/bobf32/23a41795f70baf0cd168f32c96a6a9ca

Additional Context

No response

┆Issue is synchronized with this Gitlab issue by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions