Skip to content

Blank lines to delineate different files should not be emitted when using -NI flags #1709

@sheisnicola

Description

@sheisnicola

What version of ripgrep are you using?

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

How did you install ripgrep?

Homebrew.

What operating system are you using ripgrep on?

Darwin nicolaw-aframe 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64

Describe your bug.

Blank lines are still printed between matching when using -NI flags to surppress the printing of the filename and line numbers. If filenames and numbers are being suppressed, then the blank line to separate each file has no meaning or context so I would not expect them to be printed.

What are the steps to reproduce the behavior?

Assuming that there are multiple files in your /etc/ filesystem that contain the word host, then I would not expect any blank lines to be emitted from the following command; I would only expect to see lines that contain the word host emitted:

rg -NI host /etc

What is the actual behavior?

Blank lines are printed to delineate the results from one matching file to the next.

What is the expected behavior?

No blank lines should be emitted.

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