I'm having trouble recently using silver searcher.
There are 2 files in a directory containing same content:
A.cpp:
This is a cpp file
B.cpp:
This is a cpp file
However, $ ag cpp
returns the result of B.cpp
, not that of A.cpp
:
B.cpp
1:This is a cpp file
How do I deal with that?
Here is the ag command man page
I guess
A.cpp
has been ignored.Check your
.gitignore
and.ignore
, etc..Or you simply search all files with
$ ag cpp -u
.See more detail by
$ ag | ag "unrestricted"