6

I have a folder of aliases. These are bash files. Some are sensitive, so I keep them in a .gitignore.

~/.bash_utilities
   bash_a.sh
   bash_b.sh
   .gitignore

.gitignore: bash_b.sh

The problem is that my Silver Searcher looks at the .gitignore and skips those files when looking. How do I tell Silver Searcher to ignore the .gitignore file and look in all the files in the directory?

My current command is

ag $1 ~/.bash*
dda
  • 6,030
  • 2
  • 25
  • 34
WebQube
  • 8,510
  • 12
  • 51
  • 93

1 Answers1

11

IIUC, it's well explained in man ag:

-u --unrestricted

Search all files. This ignores .ignore, .gitignore, etc. It searches binary and hidden files as well.

-U --skip-vcs-ignores

Ignore VCS ignore files (.gitignore, .hgignore), but still use .ignore.

Community
  • 1
  • 1
Arkadiusz Drabczyk
  • 11,227
  • 2
  • 25
  • 38