[pkgng] case-sensitive search?
crees at FreeBSD.org
Sat Jan 12 17:21:07 UTC 2013
On 11 January 2013 19:30, Alex Keda <admin at lissyara.su> wrote:
> 11.01.2013 23:05, Chris Rees пишет:
>> On 11 January 2013 17:27, Alex Keda <admin at lissyara.su> wrote:
>>> root at amazon:/home/lissyara # pkg -v
>>> root at amazon:/home/lissyara # pkg search phpmyadmin
>>> root at amazon:/home/lissyara # pkg search myadmin
>>> root at amazon:/home/lissyara # pkg search dmin
>>> phpMyAdmin-3.5.5 A set of PHP-scripts to manage MySQL over
>>> root at amazon:/home/lissyara #
>>> it's bad behavior... good behavior - case-insensitive search by defult
>> Like which other UNIX tool? :)
>> To be honest, I'm not sure that capitals in PKGNAME is a good idea; a
>> quick perusal of the manpage doesn't show case insensitivity.
> for backward compatibility, because
>> cd /usr/ports && make search name=....
> is case insensitivity.
I've made a patch against pkgng HEAD, to add a -l option (just for pkg
search currently) to use the SQL LIKE operator. This allows for case
insensitivity. Perhaps it could just be default?
If you want to try it out, stick the following as patch-like.diff into
ports-mgmt/pkg/files (crude backport):
It works for me;
[crees at pegasus]/usr/ports/ports-mgmt/pkg% pkg search -l mailscanner
MailScanner-4.84.5_3 Powerful virus/spam scanning framework
for mail gateways
More information about the freebsd-ports