1

I'm using ag v 2.2. How do I configure ag so that it will search for files beginning with a "." in addition to all other files? I'm noticing I have a file like so

$ cat client/.env.production 
REACT_APP_PROXY=https://map.chicommons.coop

but when I search with "ag" using a term in that file, the term doesn't come up ...

$ ag 'map\.chicom' .
web/directory/settings.py
28:ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'dev.chicommons.coop', 'map.chicommons.coop']

client/config.js
3:    ? "map.chicommons.com"
Dave
  • 2,348
  • 21
  • 54
  • 84

1 Answers1

3

ag has a --hidden flag to include dotfiles:

ag --hidden 'map\.chicom'

and an --unrestricted flag to include all files (it would normally ignore files excluded by .gitignore, .hgignore, or .ignore files):

ag --unrestricted 'map\.chicom'
Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
pLumo
  • 22,231
  • 2
  • 41
  • 66