Skip to content
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

Add "bundle search" subcommand #360

Merged
merged 1 commit into from May 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions bin/bundler-search
@@ -0,0 +1,15 @@
#!/bin/sh

# Search your bundle for the provided pattern
# Requires bundler 1.8+ for execution as a bundler subcommand.
# Examples:
# bundle search Kernal.warn
# bundle search current_user clearance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I wanted to search for a query that has multiple words, do I just quote it?

bundle search "Change your password" clearance

Might be worth adding to the example.

# bundle search "Change your password" clearance
#
# Arguments:
# 1. What to search for
# 2. Which gem names to search (defaults to all gems)

pattern="$1"; shift
ag "$pattern" $(bundle show --paths "$@")