Skip to content

.aginore not ignoring filenames containing several dots #755

@ghost

Description

If my .agignore file contains:

*.htm

And if I have two files a.htm and a.b.htm, the latter is not ignored by .agignore.

Here's an example:

$ echo "needle" > haystack.htm
$ echo "needle" > haystack.a.htm
$ echo "*.htm" > .agignore
$ ag needle
haystack.a.htm
1:needle

I found out that using **.htm works in this case, but if this is intentional, it is very uninituitive, especially since it does not follow .gitignore syntax. I'd recommend in this case mentioning this explicitly in https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage, which says that:

.agignore uses the same patterns as .gitignore and .hgignore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions