kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
465 stars 62 forks source link

Fix how kiss searches for packages #31

Closed naltun closed 5 years ago

naltun commented 5 years ago

I am using kiss 0.5.9-1 (from kisslinux/repo/releases/tag/0.0.18-musl).

Take this screenshot: image

If kiss search py* returns python-setuptools, it should also return python. If kiss search py doesn't return anything, then kiss search py* should also return nothing.

We should standardize how kiss searches for packages. I would expect all 3 searches to return the same packages:

kiss search py
kiss search py*
kiss search python
# => python-setuptools, python

We could also have an --exact flag, a la:

$ kiss search --exact python-setuptools # => python-setuptools

Edit: Add kiss version Edit: Actually, the --exact flag may add unnecessary complexity to the package manager. Keeping the KISS Linux projects' APIs small is a project priority.

dylanaraps commented 5 years ago

Fixed in: https://github.com/kisslinux/kiss/commit/b2dd5198f20e7dbbe45a156e4fdb45c8a75ac539

NOTE: As * is expanded on the command-line usage is like this:

kiss s 'busy*'
kiss s busy\*
kiss s 'busybo?'
kiss s busybo\?

# exact match
kiss s busybox
naltun commented 5 years ago

@dylanaraps, quick and elegant! Thanks!