2015-03-13 14:58:06 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Search your bundle for the provided pattern
|
|
|
|
# Requires bundler 1.8+ for execution as a bundler subcommand.
|
|
|
|
# Examples:
|
2015-10-18 10:58:50 -05:00
|
|
|
# bundle search Kernel.warn
|
2015-03-13 14:58:06 -04:00
|
|
|
# bundle search current_user clearance
|
|
|
|
# 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 "$@")
|