-
Notifications
You must be signed in to change notification settings - Fork 809
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
Search Function #314
Search Function #314
Conversation
__omf.search.usage | ||
end | ||
case '*'; | ||
__omf.search.usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that all command line interface stuff like parameter should be done in omf.cli.*
functions. Please move this "0 arguments" case there 👍
Absolutely loved it! Very cool! I will take a closer look at weekend! |
I've updated the code according to your feedback. |
I can test this some more later today, and then let's see this get merged! Great work, @lfiolhais! |
@lfiolhais I see just one bug with |
case "-t" "--theme"; | ||
omf.search.theme $argv[2] | ||
case '*'; | ||
__omf.search.usage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a typo I think; it should be __omf.cli.search.usage
instead of __omf.search.usage
.
@CoderStephen Fixed! |
@lfiolhais Excellent; everything looks good to me. Just rebase onto master and then I can merge. Thanks for the contribution! |
You can now search the OMF db for both packages and themes. To search for a package simply type `omf search -pkg <name-of-pkg>` or `omf search --package <name-of-pkg>`. To search for a theme the flags are `-t` or `--theme`. If you are not sure about what you are searching running `omf search <item>` will net you results for packages and themes.
The error reported by travis is unrelated to my changes. |
👍 |
This PR adds a search command to OMF per #292. The search command supports searches for both themes and packages. To execute a search run
omf search
with the flags-t / --theme
for themes or-pkg / --package
for packages. If neither flag is present both themes and packages will be searched.The output is as follow:
This my first "big" PR to OMF so any feedback is welcomed and appreciated. 😄