Function rg::config::parse_reader

source ·
fn parse_reader<R: Read>(
    rdr: R
) -> Result<(Vec<OsString>, Vec<Box<dyn Error>>), Box<dyn Error>>
Expand description

Parse a single ripgrep rc file from the given reader.

Callers should not provided a buffered reader, as this routine will use its own buffer internally.

On success, this returns a set of shell arguments, in order, that should be pre-pended to the arguments given to ripgrep at the command line.

If the reader could not be read, then an error is returned. If there was a problem parsing one or more lines, then errors are returned for each line in addition to successfully parsed arguments.