Created
January 21, 2014 03:46
-
-
Save tony612/8534170 to your computer and use it in GitHub Desktop.
Useful ag options
This file contains hidden or 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
| ag "^foo(bar)?" | |
| ag -i "foo bar" # ignore case | |
| ag --ignore "*.min.*" foo # ignore files/directory matching the pattern. | |
| ag -G '.*.css' foo # Limit files to which match the pattern. | |
| ag -l # Only print filenames that contain matches | |
| # search and replace | |
| ag --ignore "*.css" --ignore "*.min.js" -l 'halfings' | xargs perl -pi -E 's/halfings/halflings/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment