Skip to content

Globs that end with a dot don't work properly #2990

Open
@tavianator

Description

@tavianator

Please tick this box to confirm you have reviewed the above.

  • I have a different issue.

What version of ripgrep are you using?

ripgrep 14.1.1

features:+pcre2
simd(compile):+SSE2,-SSSE3,-AVX2
simd(runtime):+SSE2,+SSSE3,+AVX2

PCRE2 10.43 is available (JIT is available)

How did you install ripgrep?

pacman

What operating system are you using ripgrep on?

Arch Linux

Describe your bug.

Ripgrep seems to ignore glob patterns that end with a dot (.)

What are the steps to reproduce the behavior?

tavianator@graphene $ mkdir asdf asdf.
tavianator@graphene $ touch asdf/foo asdf./foo

What is the actual behavior?

tavianator@graphene $ rg --files -g '!asdf/'
asdf./foo
tavianator@graphene $ rg --files -g '!asdf./'
asdf./foo
asdf/foo

What is the expected behavior?

tavianator@graphene $ rg --files -g '!asdf./'
asdf/foo

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