2015-09-25 5 views

Antwort

5

Es stellt sich heraus, dass ag den Inhalt der .gitignore Datei standardmäßig berücksichtigt. Wenn also node_modules in .gitignore ist, wird AG nicht suchen. Dies ist alles vernünftige Verhalten, aber schwierig zu debuggen, wenn Sie es nicht erwarten. Hoffentlich wird dieser Beitrag helfen.

Es gibt eine gute Zusammenfassung am Ende der man ag:

IGNORING FILES 

    By default, ag will ignore files whose names match patterns in .gitig- 
    nore, .hgignore, or .agignore. These files can be anywhere in the 
    directories being searched. Ag also ignores files matched by the 
    svn:ignore property if svn --version is 1.6 or older. Finally, ag looks 
    in $HOME/.agignore for ignore patterns. Binary files are ignored by 
    default as well. 

    If you want to ignore .gitignore, .hgignore, and svn:ignore, but still 
    take .agignore into account, use -U. 

    Use the -t option to search all text files; -a to search all files; and 
    -u to search all, including hidden files. 

Für meine Zwecke ag -t scheint gut zu funktionieren.

Verwandte Themen