ggreer / the_silver_searcher

A code-searching tool similar to ack, but faster.
http://geoff.greer.fm/ag/
Apache License 2.0
26.18k stars 1.43k forks source link

"ERR: Error: No query." on empty string with -l #899

Open rlpowell opened 8 years ago

rlpowell commented 8 years ago

The man page says:

   -l --files-with-matches
          Only print the names of files containing matches, not the matching lines. An empty query will print all files that would be searched.

but:

/bin/ag -l /home/rlpowell/src

doesn't work because that searches for the string /home/rlpowell/src in the current directory.

So attempting the obvious fix I get:

rlpowell@stodi> /bin/ag -l '' /home/rlpowell/src ERR: Error: No query. What do you want to search for?

mattscamp commented 8 years ago

I have noticed this as well. You can pass '.' as the query for a temporary workaround. I will see if I can take a look at this today.