shilangyu / scoop-search

Fast `scoop search` drop-in replacement 🚀
MIT License
255 stars 10 forks source link

Support regex search queries #53

Open goyalyashpal opened 3 months ago

goyalyashpal commented 3 months ago

Difference: Upstream allows "or"-ing search terms with |. But scoop-search doesn't.

> scoop-search.exe "qalculate|autohotkey"
No matches found.
> scoop search "qalculate|autohotkey"
Results from local buckets...

Name          Version   Source      Binaries
----          -------   ------      --------
autohotkey    2.0.11    extras
qalculate     5.0.0     extras
autohotkey-np 1.1.37.02 nonportable
> scoop list | grep.exe scoop-search
Installed apps:
scoop-search          1.4.1                    main   2024-03-21 21:45:29
> scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15
goyalyashpal commented 3 months ago

this is extremely handy while migrating from manual installs to scoop installs. as i can paste same expression in "bulk crap uninstaller" and in "scoop-search" to compare the offerings

> scoop search "autohotkey|qalculate|doublecmd|raku|libreof|sharex"
Results from local buckets...

Name          Version    Source      Binaries
----          -------    ------      --------
autohotkey    2.0.11     extras
doublecmd     1.0.11     extras
libreoffice   24.2.1     extras
qalculate     5.0.0      extras
sharex        16.0.1     extras
rakudo-moar   2024.02-01 main
rakudo-star   2024.02-01 main
autohotkey-np 1.1.37.02  nonportable
shilangyu commented 3 months ago

It seems like this is due to scoop search actually accepting regexes, not raw strings. I will rename this issue to reflect full regex support. It is unclear whether I will get to it though, seems like there is no good Regex support in zig, I would have to link against some external libraries.