Returns a clap matches object if the given arguments parse successfully.
Attempts to discover the current working directory. This mostly just defers
to the standard library, however, such things will fail if ripgrep is in
a directory that no longer exists. We attempt some fallback mechanisms,
such as querying the PWD environment variable, but otherwise return an
error.
Retrieves the hostname that ripgrep should use wherever a hostname is
required. Currently, that’s just in the hyperlink format.
Tries to assign a timestamp to every Subject
in the vector to help with
sorting Subjects by time.
Attempts to get the hostname by using platform specific routines. For
example, this will do gethostname
on Unix and GetComputerNameExW
on
Windows.
Sorts by an optional parameter.
If parameter is found to be None
, both entries compare equal.
Inspect an error resulting from building a Rust regex matcher, and if it’s
believed to correspond to a syntax error that another engine could handle,
then add a message to suggest the use of the engine flag.
Inspect an error resulting from building a Rust regex matcher, and if it’s
believed to correspond to a syntax error that PCRE2 could handle, then
add a message to suggest the use of -P/–pcre2.
Convert the result of parsing a human readable file size to a usize
,
failing if the type does not fit.
Returns a value that is meant to fill in the {wslprefix}
variable for
a user given hyperlink format. A WSL prefix is a share/network like thing
that is meant to permit Windows applications to open files stored within
a WSL drive.