MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / normalize_completion_script

Function normalize_completion_script

crates/openshell-cli/src/main.rs:677–681  ·  view source on GitHub ↗
(output: Vec<u8>, executable: &std::path::Path)

Source from the content-addressed store, hash-verified

675";
676
677fn normalize_completion_script(output: Vec<u8>, executable: &std::path::Path) -> Result<String> {
678 let script = String::from_utf8(output)
679 .map_err(|e| miette::miette!("generated completions were not valid UTF-8: {e}"))?;
680 Ok(script.replace(executable.to_string_lossy().as_ref(), "openshell"))
681}
682
683#[derive(Clone, Debug, ValueEnum)]
684enum OutputFormat {

Callers 2

mainFunction · 0.85

Calls

no outgoing calls