Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Complex search with &|() ftw! #1275

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

thejh commented Aug 16, 2011

Here it is comink, complex search for npm!

Example:

$ node bin/npm.js search '(stream xml)|sax'
NAME            DESCRIPTION                                                AUTHOR      KEYWORDS
dom-js          XML DOM based on sax                                       =teknopaul
halfstreamxml   converts a stream of XML to a stream of objects            =thejh      XML stream SAX
readabilitySAX  the readability script ported to a sax parser              =feedic
sax                                                                        =isaacs
xml-stream      XML stream to JavaScript object converter based on Expat.  =dimituri   xml parser expat
$

npm search foo bar and npm search 'foo bar' give the same result.

Owner

isaacs commented Dec 6, 2011

It turned out to be a lot easier to just enable regexps in search. If you start the term with / then it'll treat it as a regular expression, so you can do all that fancy stuff that way, without implementing Yet Another Microlanguage for this. (Globs and regexps are enough :)

@isaacs isaacs closed this Dec 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment