BurntSushi/ripgrep · error

{err} Consider enabling multiline mode with the --multiline

Error message

{err}

Consider enabling multiline mode with the --multiline flag (or -U for short).
When multiline mode is enabled, new line characters can be matched.

Consider enabling text mode with the --text flag (or -a for short). Otherwise,
binary detection is enabled and matching a NUL byte is impossible.

What it means

Error "{err} Consider enabling multiline mode with the --multiline flag (or -U for short). When multiline mode is enabled, new line characters can be matched. Consider enabling text mode with the --text flag (or -a for short). Otherwise, binary detection is enabled and matching a NUL byte is impossible." thrown in BurntSushi/ripgrep.

Source

Thrown at crates/core/flags/hiargs.rs:521

            // be allowed to match NUL bytes explicitly, which this would
            // otherwise forbid.
            if self.null_data {
                builder.line_terminator(Some(b'\x00'));
            }
        }
        if let Some(limit) = self.regex_size_limit {
            builder.size_limit(limit);
        }
        if let Some(limit) = self.dfa_size_limit {
            builder.dfa_size_limit(limit);
        }
        if !self.binary.is_none() {
            builder.ban_byte(Some(b'\x00'));
        }
        let m = match builder.build_many(&self.patterns.patterns) {
            Ok(m) => m,
            Err(err) => {
                anyhow::bail!(suggest_text(suggest_multiline(err.to_string())))
            }
        };
        Ok(PatternMatcher::RustRegex(m))
    }

    /// Returns true if some non-zero number of matches is believed to be
    /// possible.
    ///
    /// When this returns false, it is impossible for ripgrep to ever report
    /// a match.
    pub(crate) fn matches_possible(&self) -> bool {
        if self.patterns.patterns.is_empty() && !self.invert_match {
            return false;
        }
        if self.max_count == Some(0) {
            return false;
        }
        true

View on GitHub (pinned to 3fce3b5bb0)

Solutions

  1. Enable multiline mode with --multiline (-U) to match newline characters
  2. Use --text (-a) to disable binary detection so NUL bytes can be matched

When it happens

Trigger: Thrown at crates/core/flags/hiargs.rs:521 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BurntSushi/ripgrep@3fce3b5bb0 (2026-08-06). Data as JSON: /data/errors/b14cd637624f9390.json. Report an issue: GitHub.