Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#851 Find in Files doesn't accept option --include

Interface (176)

If I do a recursive "Find in Files" and specify the extra option --include "*.[ch]" the search always comes up empty. If I leave out the option the search finds the documents containing my search term.

If I repeat the search on the command line using grep and the options that geany shows me, then grep does find the files I want (C and H-files):
$ grep -nHlifr --include "*.[ch]" -- abcd *

I tried different formats for --include: "*.[ch]", '*.[ch]' and \*.\[ch\]
They all don't work with geany but they do work on the commandline.

I'm using geany 0.19.1 "Vellam" and GNU grep 2.6.3 on Debian Squeeze 2.6.32-5-amd64.


  • This is because the extra options weren't parsed as a shell expression but simply as a whitespace-separated list of arguments, thus leading to give grep the raw "*.[ch]" pattern, with the quotes. This is now fixed in Git.

    You can however simply remove the quoting for the command to work as expected. Moreover, you could also simply use the Files filter to set the --include option for you, e.g. "*.c *.h", see the manual for details.

    • assigned_to: nobody --> colombanw
    • status: open --> closed-fixed
  • Geert

    Thanks for that. Leaving out the quotes works :-)

    I can't find the "Files filter" you mention. The manual has only an entry for "Filtering out version control files".
    I'm looking at: http://www.geany.org/manual/current/index.html

    Could this be a plugin?

    • milestone: --> v1.22