pub fn run(args: Vec<OsString>) -> ExitCodeExpand description
Run the rich command line with args (the arguments after the program
name) and return its exit status. The rich binary’s main is only this.
This library target exists for the Python wheel (crates/rich-py), which
runs the CLI in-process through run_embedded; it is not a supported
Rust API, and everything else in it is private. Output goes to the
process’s real stdout and stderr and input comes from its stdin; some modes
(--batch, --watch, the demo) install a process-wide Ctrl-C handler, and
a few error paths end the process.
Arguments that are not valid Unicode are parsed by their escaped
spelling (see [path_arg]), and a file named by one is opened by its
original bytes (see [fs_path]), as upstream’s click does through
surrogateescape; text such as --print’s shows lossily ([text_arg]).