Skip to content

--sort=path is not properly documented #2418

@safinaskar

Description

@safinaskar

What version of ripgrep are you using?

ripgrep 13.0.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

cargo install ripgrep

What operating system are you using ripgrep on?

Debian GNU/Linux Stretch

Describe your bug.

--sort=path is not fully documented in rg --help output. I can imagine two different implementations: in the first one path simply sorted as strings. This is what you get when you run LC_ALL=C sort. So we get this order:

a+
a/a
a0

The second way is to threat / specially. This gives the following order:

a/a
a+
a0

My experiments show that rg --sort=path uses second way. But this is not documented, so I'm not sure I can rely on it

Metadata

Metadata

Assignees

No one assigned

    Labels

    docAn issue with or an improvement to documentation.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