New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add search to cpm #121

Open
atoomic opened this Issue Apr 21, 2018 · 4 comments

Comments

2 participants
@atoomic
Contributor

atoomic commented Apr 21, 2018

Here is the idea:
add search feature to use metacpan API then show results and ask which one to install

> cpm search CSV
# use metacpan API to perform the search and show the top X
# https://fastapi.metacpan.org/v1/release/_search?q=CSV&fields=name,status,abstract&size=10
1 - XML::CSV - Perl extension converting CSV files to XML
2 - App::CSV - process CSV files
3 - ...
...
Which module do you want to install? [1-10] or name: 

Search sample
https://fastapi.metacpan.org/v1/release/_search?q=CSV&fields=name,status,abstract&size=10

@skaji

This comment has been minimized.

Owner

skaji commented Apr 21, 2018

@atoomic I tried to implement this feature in "search" branch.
https://github.com/skaji/cpm/tree/search

You can try it by:

curl -sSLO https://raw.githubusercontent.com/skaji/cpm/search/cpm
chmod +x cpm
./cpm search Plack

screen shot 2018-04-21 at 11 54 22

So is this useful for you and others?

@atoomic

This comment has been minimized.

Contributor

atoomic commented Apr 21, 2018

this looks excellent to me, minor bug when trying to install one module as the original argument is used by resolved
screen shot 2018-04-21 at 12 59 09 pm

minor remark: "by Author" could be white so we can quickly notice the module name

@atoomic

This comment has been minimized.

Contributor

atoomic commented Apr 21, 2018

another suggestion: add an alias 'grep' to search

@skaji

This comment has been minimized.

Owner

skaji commented Apr 21, 2018

@atoomic thanks!

minor bug when trying to install one module as the original argument is used by resolved
minor remark: "by Author" could be white so we can quickly notice the module name

Both are fixed in current "search" branch.

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