Created
February 23, 2015 10:50
-
-
Save Congee/085b21b2d78547e2d43b to your computer and use it in GitHub Desktop.
Ag as a peco matcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
while read LINE; do | |
if [[ -f "${LINE}" ]] &&\ | |
[[ -r "${LINE}" ]] &&\ | |
[[ $(ag -l "$1" "${LINE}") ]]; then | |
echo "${LINE}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment