Skip to content

-M not recognized if preceding pattern #1648

@bedge

Description

@bedge

What version of ripgrep are you using?

[I] ➜ rg --version
ripgrep 12.1.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

homebrew

What operating system are you using ripgrep on?

osx mojave

Give a high level description of the bug.

Syntax info says:

USAGE:

    rg [OPTIONS] PATTERN [PATH ...]

So this should work:

[I] ➜ echo test | rg -M 900 st
error: The following required arguments were not provided:
    <PATTERN>

but it doesn't, one has to use:

[I] ➜ echo test | rg st -M 900
test

IOW, options before the pattern should be allowed, but it appears that at least the -M option only works if after the pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.rollupA PR that has been merged with many others in a rollup.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions