parse_pre_args

Function parse_pre_args 

Source
pub fn parse_pre_args(
    args: &[String],
) -> Result<(Vec<String>, ParsedArgs), Error>
Expand description

It parses rag [-C <path>] <command> <args> and returns Ok((args, pre_args)) where args is rag <command> <args> and pre_args is -C <path>.

NOTE: Do not use this function. I have implemented this because I’m not sure how to implement -C option. I’ll remove this function as soon as I come up with a nice way to implement -C.

It only supports -C <path> and not -C=<path> and that’s intentional. Git neither supports -C=<path> (I don’t know why), and I decided to blindly follow that.