5 examples for ag
# Recursively search for text 'foo' ag foo # Recursively search for filename 'file' ag -g file
# search for app.txt Ag app.txt # search for special characters and only list filenames Ag 'foo\(' -l # search and ignore a directory Ag foo --ignore dir # search case insensitive Ag foo -i
# search for GREP_OPTIONS= in all dirs except usual suspects (sys, tmp, var, etc.) ag -Q "GREP_OPTIONS=" --ignore-dir=run --ignore-dir=tmp --ignore-dir=sys --ignore-dir=lost+found --ignore-dir=var
# Print only matching parts of each line for a regex (and no filenames) ag --nofilename -o 'some\.thing'