scatterd-dotfiles/bin/bundler-search
2015-10-21 08:19:17 -04:00

15 lines
422 B
Bash
Executable file

#!/bin/sh
# Search your bundle for the provided pattern
# Requires bundler 1.8+ for execution as a bundler subcommand.
# Examples:
# bundle search Kernel.warn
# 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 "$@")