You are not logged in.

#1 2017-06-05 09:19:09

regid
Member
Registered: 2016-06-06
Posts: 201

AUR search: `tool like grep' vs `tool%like%grep'

Arch wiki wrote:

e.g. try searching for tool%like%grep instead of tool like grep (at searching the AUR)

The way I understand the wiki section is that `tool%like%grep' is more powerful. With `tool like grep' I get 3 results. With `tool%like%grep' I get none. What am I missing?

Last edited by regid (2017-06-05 09:21:38)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#2 2017-06-05 09:30:11

mpan
Member
Registered: 2012-08-01
Posts: 1,205
Website

Re: AUR search: `tool like grep' vs `tool%like%grep'

Seems like an outdated entry in Wiki. AUR takes % literally now.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2017-06-05 09:56:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: AUR search: `tool like grep' vs `tool%like%grep'

But the explanation of why it was that way: the wiki says it uses a mySQL LIKE clause in which case "tool like grep" would only match the exact phrase while "tool%like%grep" would match anything with those three words in that order (assuming the query wrapped the user-entered string in another pair of %...%).  In mySQL, the '%' is a flexible-length wildcard.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB